The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Beekeeper::Service::Sinkhole::Worker - Handle unserviced call topics

VERSION

Version 0.09

DESCRIPTION

In the case of all workers of a given service being down, all requests sent to the service will timeout as no one is serving them. This may cause a serious disruption in the application, as any other service depending of the broken one will halt too for the duration of the timeout.

In order to mitigate this situation all Sinkhole workers will be notified by the Supervisor when unserviced topics are detected, making these to respond immediately to all requests with an error response. Then callers will quickly receive an error response instead of timing out.

As soon as a worker of the downed service becomes online again the Sinkhole workers will stop rejecting requests.

A single Sinkhole worker can handle around 4000 req/s.

Sinkhole workers are not created automatically. In order to add Sinkhole workers to a pool these must be declared into config file pool.config.json:

  [
      {
          "pool_id" : "myapp",
          "bus_id"  : "backend",
          "workers" : {
              "Beekeeper::Service::Sinkhole::Worker" : { "worker_count": 2 },
               ...
          },
      },
  ]

This worker class does not expose public RPC methods.

AUTHOR

José Micó, jose.mico@gmail.com

COPYRIGHT AND LICENSE

Copyright 2015-2023 José Micó.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language itself.

This software is distributed in the hope that it will be useful, but it is provided “as is” and without any express or implied warranties. For details, see the full text of the license in the file LICENSE.