Codebase list golang-github-go-kit-kit / f85f7f7
rfc: server: SLAs + SLIs; star some sections Peter Bourgon 9 years ago
1 changed file(s) with 13 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
22 ---
33
44 RFC: 000
5
65 Author: Matt Heath <matt@mattheath.com>
7
8 Status: Draft
6 Status: Accepted
97
108 ---
119
1311
1412 [http://peter.bourgon.org/go-kit/#package-server](http://peter.bourgon.org/go-kit/#package-server)
1513
16 Package server is probably the biggest and most important component of the toolkit. Ideally, we should be able to write our services as implementations of normal, nominal Go interfaces, and delegate integration with the environment to the server package. The package should encode and enforce conventions for server-side concerns, like health checks, system-wide request tracing, connection management, backpressure and throttling, and so on. For each of those topics, it should provide interfaces for different, pluggable strategies. It should integrate with service discovery, and work equally well over multiple transports. Considerable prior art exists in the form of Finagle, Karyon (Netflixs application service library), and likely many more.
14 Package server is probably the biggest and most important component of the toolkit. Ideally, we should be able to write our services as implementations of normal, nominal Go interfaces, and delegate integration with the environment to the server package. The package should encode and enforce conventions for server-side concerns, like health checks, system-wide request tracing, connection management, backpressure and throttling, and so on. For each of those topics, it should provide interfaces for different, pluggable strategies. It should integrate with service discovery, and work equally well over multiple transports. Considerable prior art exists in the form of Finagle, Karyon (Netflix's application service library), and likely many more.
1715
1816 ## Scope
17
18 Sections with a ★ are considered particularly volatile, and may change significantly in the future.
1919
2020 ### Endpoints
2121
3838 * Rate limit behaviour MAY range from minimum request intervals, to time based, or leaky bucket algorithms.
3939 * A server MAY implement a pluggable throttle interface, allowing richer implementations - such as an implementation which shares information across instances of the service.
4040
41 ### SLAs
41 ### SLAs & SLIs
4242
43 * A server MAY report its SLA per endpoint to a discovery system, allowing clients to estimate response time.
43 * A server MAY report its contractual SLA per endpoint to a discovery system, allowing clients to estimate response time.
44 * A server MAY expose its actual SLI per endpoint, allowing third-parties to reason about healthiness.
4445
45 ### Healthchecks
46 ### Healthchecks ★
4647
4748 * A server SHALL accept registration of healthchecks with a defined interface.
4849 * A server MAY register default healthchecks to report the health of built in components of the server.
6566 * A server SHALL receive and respond to requests via a Transport.
6667 * The Transport mechanism SHALL be interchangeable, and satisfy a defined interface, however the mechanism of the transport is beyond the scope of this RFC.
6768
68 ### Codec
69 ### Codec ★
6970
7071 * A server SHALL encode and decode requests and responses via an interchangeable Codec.
7172 * A server MAY support multiple encodings, and use the appropriate Codec as indicated by the transport.
7778
7879 ## Further Reading
7980
80 [Your Server as a Function](http://monkey.org/~marius/funsrv.pdf) - Marius Eriksen
81
82 [Finagle](https://twitter.github.io/finagle/) - Twitter
83
84 [Karyon](https://github.com/Netflix/karyon) - Netflix
85
86 [State of the Art in Microservices](https://www.slideshare.net/adriancockcroft/dockercon-state-of-the-art-in-microservices) - Adrian Cockcroft
81 * [Your Server as a Function](http://monkey.org/~marius/funsrv.pdf) - Marius Eriksen
82 * [Finagle](https://twitter.github.io/finagle/) - Twitter
83 * [Karyon](https://github.com/Netflix/karyon) - Netflix
84 * [State of the Art in Microservices](https://www.slideshare.net/adriancockcroft/dockercon-state-of-the-art-in-microservices) - Adrian Cockcroft