skroutz / rafka

Kafka proxy with a simple API, speaking the Redis protocol
https://engineering.skroutz.gr/blog/kafka-rails-integration/
GNU General Public License v3.0
8 stars 0 forks source link

Shutdown revamp #68

Closed agis closed 6 years ago

agis commented 6 years ago

This patch aims to minimize the downtime for producers and make the shutdown process generally more robust. The flow is now the following:

1) shutdown signal is received 2) manager: stop accepting new consumers and close existing consumers 3) server: stop accepting new producers and close existing producers 5) shutdown and restart

This way, producer downtime is reduced to the time elapsed between (3) and (5), which should be less than a second. Nevertheless, clients should still have sane retry defaults configured anyway, because some downtime will still occur.

Also added a hard timeout of 5 seconds around the shutdown process.