A Flag Is A Decision Made Before The Service
The service receives a finished yes or no the same way it receives who arrived - not the address of a flag store. ๐ Hi, I'm Anton - a software engineer working mostly in PHP/Symfony and Go, currently carving a live PHP monolith into Go services. This block is about the things a fleet has to do identically or every service reinvents them; this part is the shortest of the four, and it is oneโฆ
In a service, a flag does not represent a variable within that service. Instead, it is a decision that is made before the service begins to run. The decision about whether a particular branch should be active is determined by the edge, and this decision is carried along with the identity claim of the caller. This decision is not affected by the specific service's cache, configuration, or refresh mechanisms.
The platform library provides a cache with features such as time-to-live, capacity limits, and metrics, which can be imported into a service rather than being written from scratch. Each service decides on the configuration, keeps its own cache, and performs its own refresh. This approach avoids the issue of having multiple copies of the same code running in different services, which can be difficult to observe and manage.
By making the decision at the edge, a service can read a simple yes or no response, without needing to know where the answer came from or who is responsible for maintaining it.
Written by urgent.news from Dev.to's reporting โ not their text. Machine-written โ may contain errors; check the original before relying on it.