Flagsmith / Flagsmith/edge-proxy
Feature request: streaming/SSE updates to avoid full environment-document polling
- Dominant language
- Python
- Stars
- 5
- Forks
- 6
- Avg merge
- 1h 16m
- Merged PRs (30d)
- 1
Description
### Is your feature request related to a problem?
The Edge Proxy polls `/api/v1/environment-document/` on a fixed interval. Deployments running many proxy instances with short poll intervals results in an unnecessary amount of API requests to the Core API. Since [this](https://github.com/Flagsmith/edge-proxy/pull/159) was implemented, the load caused by these requests is fairly low since the environment rarely changes in relation to the polling interval, but the requests could be redundant nonetheless.
The time taken for a change to a flag to be reflected in the API served by each Edge Proxy instance is also therefore dependent on the polling interval. When using longer polling intervals (to optimise API requests for example), a change could take up to one full polling interval to be reflected in the API served by the Edge Proxy.
### Describe the solution you would like
A streaming or push based update channel (for example SSE) for environment updates, so a proxy is notified when an environment changes rather than polling the Core API.
### Additional context
Most relevant for high instance count deployments.
Contributor guide
Research direction
Start by tracing the Edge Proxy polling of /api/v1/environment-document/ and reviewing PR 159 to understand the existing update path. Then investigate how an SSE or other push channel could be introduced; done means proxy instances receive environment changes without fixed-interval full-document polling and the behavior is validated for deployments with many instances.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100