Chapter 8. Distribution and load balancing

 

This chapter covers

  • The basics of distributed Elixir
  • Implementing a distributed load tester
  • Building a command-line application
  • Tasks: an abstraction for short-lived computations
  • Implementing a distributed, fault-tolerant application

This chapter and the next will be the most fun chapters (I say that about every chapter). In this chapter, we’ll explore the distribution capabilities of the Erlang VM. You’ll learn about the distribution primitives that let you create a cluster of nodes and spawn processes remotely. The next chapter will explore failover and takeover in a distributed system.

In order to demonstrate all these concepts, you’ll build two applications. The first is a command-line tool to perform load testing on websites. Yes, this could very well be used for evil purposes, but I’ll leave you to your own exploits.

The other is an application that will demonstrate how a cluster handles failures by having another node automatically step up to take the place of a downed node. To take things further, it will also demonstrate how a node yields control when a previously downed node of higher priority rejoins the cluster.

8.1. Why distributed?

8.2. Distribution for load balancing

8.3. Introducing Tasks

8.4. Onward to distribution!

8.5. Remotely executing functions

8.6. Making Blitzy distributed

8.7. Summary

sitemap