Skip to content

richardse/codewords

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  • Codewords

This is the base code for a workshop on how to instrument source code for Prometheus monitoring. In order to successfully instrument code, you will need to have at least a rough idea of what's important. To help with that, this document contains the design constraints, as well as a rough guide to the code.

** Design brief

The codewords service generates code phrases, constucted by taking an adjective and a noun (so things like "blue orange", "excited wombat", "sad aardvark", ...). It is important that a given code word is never repeated. It is expected that code words will be requested at an average rate (over one day) of one per minute, with a peak rate no higher than one code word every 10 seconds. It is expected that code words are available within 750 ms of the initial request being made (99.9% of the time).

** Code tour

The codewords service is split into a front-end (can be instantiated multiple times and load-balanced for availability) and a backend (not designed to work in parallel). The bulk of the code for the frontend lives in frontend/ and the bulk of the code for the bakcend lives in backend/. However, the actual source code for the main binaries are in cmd/frontend.go and cmd/backend.go respectively.

The frontend(s) and backend communicate using grpc, the user9s) and frontend(s) use HTTP.

About

Example code for further prometheus instrumenting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%