cassabon icon indicating copy to clipboard operation
cassabon copied to clipboard

Split single binary into separate stats-sink and api-server binaries

Open mredivo opened this issue 8 years ago • 4 comments

For robustness, it's probably a good idea to make separate binaries for the separate functions performed by Cassabon:

  • Receive stats and write them to storage
  • Serve HTTP requests for stats paths and stats

With this change, if the HTTP server dies, it doesn't take down a stats writer with it.

This shouldn't involve much new code, all the functionality is already present.

mredivo avatar Apr 20 '16 17:04 mredivo

I'm okay with this.

jeffpierce avatar Apr 20 '16 18:04 jeffpierce

Actually...does it make more sense to just have flags that allow Cassabon to run in carbon only or API only mode rather than splitting the binary?

jeffpierce avatar Apr 21 '16 21:04 jeffpierce

Same binary with flag is a better way, IMO. The reason being, no hassle in deployment different binaries.

utkarshcmu avatar Apr 21 '16 22:04 utkarshcmu

That's a valid point. A command-line argument to control what it does, and all other functionality is bypassed.

Might also be an idea for the new bootstrap functionality.

mredivo avatar Apr 21 '16 23:04 mredivo