HTML and CSS Reference
file, including sockets! You could see an error message about files, even if you aren't using
the disk.) Operating systems limit the number of open files per user; by default, this limit
is fairly low. These limits are in place to prevent abuse on shared systems where many
users have to contend for the same resources. On a server, however, you likely want to
allow one process to run full-throttle and use as many open files as it can.
For example, on Linux, the command ulimit -a displays the current user limits,
including the maximum allowable number of open files. You can fortunately raise this
limit on Linux (for example, you can run ulimit -n 10000 to set the user limit to ten
thousand open files). There is also a system-wide maximum, fs.file-max , that you
can raise using the sysctl command. These commands might not be the same for your
operating system, as file limits are dependent on the operating system. For example, on
Microsoft Windows, the commands vary by version; in some cases, you cannot modify
the limit. Consult the references for your system in order to set the maximum number of
open sockets for your WebSocket server.
WebSocket Application Deployment Checklist
Table 8-3 is a checklist that summarizes considerations for deploying WebSocket
Table 8-3. WebSocket Application Deployment Checklist
WebSocket Emulation and
Identify your users' browsers and versions.
Determine if a fallback strategy is necessary. If so,
employ polyfill, plugin, or Comet fallbacks.
Reverse Proxy and Load
Identify the port(s) you want to open to the public.
Identify the servers with which the reverse proxy
Determine whether you can open a port in your
firewall, and therefore whether you should use
Identify the load requirements of your network
resources, including servers and client connections.
Traversing Proxies and
Firewalls with TLS
Identify proxies and firewalls that may disrupt your
Decide to use TLS for security and/or connectivity
Identify the connections you want to monitor.
Set ping intervals to prevent connection timeout.
( continued )