...
UI Tabs | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OverviewChat for Jira Service Management Server/Data Center utilizes websockets as a communication method between the chat widget and Jira, to provide instant reception of messages while minimizing bandwidth usage. In In environments where websockets are unavailable, the connection to Jira to Jira will gracefully downgrade (with a warning in the browser's console window) to simple periodical polling mechanism, which is guaranteed to work without any special setup. This This polling, while also providing a nearly instant message reception time, consumes more network bandwidth and may (in extreme cases) use up Jira's connection pool, therefore it is preferrable to configure your environment for websockets. Setting up websockets in production environment requires a bit of setup, because typically Jira backend is located behind a proxy server. Required proxy configurations for Nginx, Apache and AWS ELB are described below. If you are using a different proxy, please consult its documentation regarding websockets forwarding. Proxy ConfigurationNginxIn addition to the usual Jira setup for Nginx proxy, you will need to configure Nginx proxy to enable websockets forwarding (in bold):
In the example above, http://jirahost is a Jira backend URL - you should obviously replace it with the actual address of your Jira. To narrow down websockets tunelling, you can use In addition to the above, it is crucial that the proxy keeps the websocket connection open even when it is idle - this is controlled by the proxy_read_timeout directive - the default of which is 60 seconds. Chat keeps the websocket open by sending a "keepalive" message every 30 seconds. It is important to not set the timeout directive to less than 30 seconds. For example, you can set it to 10 minutes:
For more information about proxying websockets by Nginx, go to its documentation: http://nginx.org/en/docs/http/websocket.html. ApacheIn addition to the usual Jira setup for Apache proxy, you will beed to configure Apache proxy to enable websockets forwarding. Firstly, you need to enable the mod_proxy_wstunnel module:
Then, set up Apache for websockets forwarding:
In the example above, ws://jirahost is a Jira backend URL - you should obviously replace it with the actual address of your Jira. The The ProxyPass statement from the config above should be the first ProxyPass in your configuration, if you have multiple ProxyPass directives, so that it does not get overriden. In addition to the above, it is crucial that the proxy keeps the websocket connection open even when it is idle - this is controlled by the ProxyWebsocketIdleTimeout directive. Chat keeps the websocket open by sending a "keepalive" message every 30 seconds. It is important to not set the timeout directive to less than 30 seconds. For example, you can set it to 10 minutes:
For more information about proxying websockets by Apache, go to its documentation: https://httpd.apache.org/docs/trunk/mod/mod_proxy_wstunnel.html Amazon AWS Elastic Load BalancerIf you have your Jira hosted on Amazon AWS and you are using their Elastic Load Balancer (ELB), you need to follow these directions to set up websockets support:
Data CenterAs per Atlassian Data Center installation documentation, the suggested load balancer is Apache. The documentation provides a sample load balancer configuration, which however will not be sufficient for enabling websockets connections to your cluster - with the sample configuration, websockets requests will fail with error 404 and chat communication will fall back to short polling. To enable websockets connections, you need to apply changes to the sample configuration (added entries are in bold):
Crucial parts of the modified config are:
|
...