pool

command module
v0.0.0-...-a2e0ade Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2018 License: MIT Imports: 7 Imported by: 0

README

Worker Pool

The worker pool distributes work across the workers to the least loaded worker.

Demo

The pool was tested by a load generator that produces tasks at a inconsistent interval, faster than the time it takes to complete the tasks itself. The tasks also take an inconsistent amount of time to finish. In this example the tasks were just sleeps.

The gif below shows values for:

  • Workers: Pending requests for worker
  • Avg Load: Average pending requests for worker pool
  • Std Dev: Standard deviation of pending requests

gif

Design

diagram

The design was based off the talk concurrency is not parallelism by Rob Pike, the diagram is also from there

  1. Requests are made by a requester
  2. The Balancer dispatch's requests to a select worker in the worker pool
  3. The Worker will execute the task specified by the request

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL