WHAT'S IN THIS CHAPTER?
Load balancing connection managers
Clustering XMPP servers
Reducing latency and serialization
Optimizing client side operations
Developing an application with XMPP is only the beginning. Once you have put the finishing touches on your latest creation, you'll likely want to share it with the world at large. Because the world is a big place, full of lots of potential users, you'll want to ensure that your application is deployed in such a way that it will scale and run as efficiently as possible.
You can scale your application in quite a few ways, both horizontally, spreading it across multiple machines, and vertically, optimizing the application and running it on better hardware. For example, many XMPP servers have a clustered operation mode, enabling more than one server to provide services under a single domain.
If your application has only modest amounts of users or traffic, feel free to skip this chapter. After all, you can always come back when your application becomes wildly popular.
Applications will often exceed the limit of resources available on a single machine. For some applications, this limit may be memory, and for others, the limit will be processor speed. Though adding more resources to the machine is an easy fix, there is a finite limit on how much can be added. Often it is better to scale horizontally by distributing the application over more than one physical machine. ...