braintree / litmus_paper

Backend health tester for HA Services
MIT License
32 stars 15 forks source link

Implement a preforking TCP server for the litmus-agent-checks #22

Closed lollipopman closed 7 years ago

lollipopman commented 7 years ago

Prior to this commit litmus-agent-check was designed to run under an xinetd style server. This provided a very simple implementation, but suffered poor performance when executing a large number of agent checks concurrently.

An attempt was made to enhance the performance, and progress was made, but the final blockers were rubygems and the ruby vm. Neither of which could be trivially optimized.

xinetd:

real 0m0.176s user 0m0.128s sys 0m0.048s

prefork:

real 0m0.008s user 0m0.004s sys 0m0.000s

This implementation lacks advanced features, like monitoring for hung children, but it is a good start, and has been tested in our QA environments successfully.

lollipopman commented 7 years ago

@bjhaid & @ssgelm I would love a review of the code