4 Workers of the Cube, unite!
This chapter covers
- Reviewing the purpose of the worker component in an orchestration system
- Reviewing the
Task
andDocker
structs - Defining and implementing an algorithm for processing incoming tasks
- Building a simple state machine to transition tasks between states
- Implementing the worker’s methods for starting and stopping tasks
Think about running a web server that serves static pages. In many cases, running a single instance of our web server on a single physical or virtual machine is good enough. As the site grows in popularity, however, this setup poses several problems:
-
Resource availability—Given the other processes running on the machine, is there enough memory, CPU, and disk space to meet the needs ...
Get Build an Orchestrator in Go (From Scratch) now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.