HTML and CSS Reference
In-Depth Information
Chapter 8
Deployment Considerations
After you've built, secured, and tested any web application, the next logical step is to
deploy it. Many considerations you must make when deploying WebSocket applications
are similar to those of any web application. In this chapter, we focus on the areas of
web application deployment that you should think about when deploying WebSocket
applications in particular.
When deploying an application, there are myriad factors you must consider,
especially for enterprises, such as business requirements, how clients will interact with
the application, the information the application uses, the number of clients that will
use the application at any given time, and so on. Some applications may require high
availability and must support many concurrent connections, while others may have a
stronger emphasis on performance and low latency. With WebSocket applications, you'll
need to provide for the same requirements, keeping in mind the nature of the WebSocket
Protocol and the type of application you're building. In this chapter, we'll look at some of
the major aspects of deployment as they specifically relate to WebSocket, like WebSocket
emulation, proxies and firewalls, load balancing, and capacity planning.
Overview of WebSocket Application Deployment
When deploying any web application, there are some general requirements you need to
take into account, such as the variety of browsers that will be using your application, the
type of application, the nature of the traffic your servers must handle, and whether the
application is driven by the server or by user interaction. Now that your mind is exploding
with all sorts of new applications you can build with WebSocket, you'll need to take these
application requirements into consideration when deploying them.
For example, you can imagine a WebSocket-based messaging application (using
STOMP over WebSocket, as we described in Chapter 5) where your application must
support thousands—nay, tens of thousands—concurrent connections. Your application
may be a stock portfolio application, where your users can track the millions of stock
transactions that happen daily. This data must refresh instantly and in real time in
order for the application to be useful; as such, you may be looking at a system where the
full-duplex connection is used by the server to stream continuous stock information
to the user's browser or mobile device, with little user interaction. In another case, you
may want to use WebSocket to create a customizable video streaming application, where
large amounts of data (several minute-long video files) may stream over the connection,
but to just a few thousand clients at time; this traffic may be sporadic throughout the
Search WWH ::

Custom Search