streaming: Expand Streaming support to all blocking queries
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
This is a placeholder issue that will be modified over time.
We are currently working on a new internal architecture to power blocking queries that is significantly more efficient. One benchmark based on an extreme but real customer workload showed the following levels of improvement for servers:
Steady CPU: 60% -> <1%, a **60x+ reduction in CPU**
Memory: 420MB -> 20MB (minus 80MB baseline), a **21x reduction in Memory**
Outbound Bandwidth: 2.2Gbps -> 0.5Mbps (mins 500k baseline), a **4,400x reduction in network throughput**
The public API for now remains the same and this is a purely internal (between client and server agents) change.
The new architecture has been intentionally designed to roll out incrementally to make it more practical and we are closing in on the first point at which we can release a major part of Consul being powered by this.
The first use-case will be the biggest impact one for many workloads - service health watching. Once that is rolled out, this issue is a placeholder for the iterative process of rolling out the same architecture to cover eventually all other blocking APIs.
The proposed order to roll them out in terms of impact is:
- Anything replicated between DCs over WAN:
- ACL Tokens and Policies
- ConfigEntries
- Intentions
- Catalog (not just Health)
- KV
Until we have completed and are ready to ship the first use-case this is a placeholder, but once we've done that and shown the patter is successful, the plan is to update this issue with a "guide" walking through the steps needed to upgrade a given API endpoint from the above list to use streaming. From there we can make individual tasks and hopefully burn them down with help from the community until all of Consul's blocking mechanisms are ported to the new streaming mechanism.
More info to come here once we are ready for that.
CC @Aestek @pierresouchay FYI.
Contributor guide
Assessment
This issue has not been assessed yet.