Skip to content

Instantly share code, notes, and snippets.

@bakins
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bakins/e62e9713ffa7c13b86da to your computer and use it in GitHub Desktop.
Save bakins/e62e9713ffa7c13b86da to your computer and use it in GitHub Desktop.
simple "synapse" type thing for consul
already do healthchecks in consul - we even need haproxy?
No way to get metadata into service - maybe insert into k/v? ie, healthcheck url.
if used haproxy - maybe just port check? or use a healthcheck grabbed from kv. wrapper go program that uses a text/template and writes haproxy config
simple go program:
"watch" service endpoint like: http://localhost:8500/v1/health/service/web?wait=120s&index=66 then add "passing" nodes to a pool then hand out connections - use httputil.reverseproxy to start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment