O'Reilly logo

Socket.IO Cookbook by Tyson Cadenhead

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Performing a Load Balancing Act

In this chapter, we will cover the following recipes:

  • Performing load balancing with the Nginx server
  • Using the Node.js cluster
  • Using Redis to pass events between nodes
  • Using Memcached to manage multiple nodes
  • Using RabbitMQ to message events across nodes

Introduction

A single node server can typically handle several thousand simultaneous connections. However, as the audience of an application grows, it is important to make sure that the application is scalable. On the server side, this means that we may want to distribute our applications across multiple threads or node instances.

The issue with distributing your application across nodes is that when we emit a message, it will only be received by one of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required