/active-proxy

Active/Inactive aware Proxy

Primary LanguageElixirMIT LicenseMIT

ActiveProxy

Assumptions

  • The application process can only run one active node at a time.
  • All nodes are running already running the application process.
  • The application process only writes when receiving requests.

Automatically Detecting When to Fail-over

TODO

Fail-over Process

  1. Pause in flight requests incoming to proxy
  2. Wait the sync timeout to make sure nodes caught up
  3. Send SIGTERM to active node to flush
  4. Kill active node's sync
  5. Treat inactive as active, route the requests to it
  6. Configure tail node to sync to what was originally the active node
  7. Enqueue previous active node to the upstream hosts
  8. Finished