I have a question about range handler microservice. You have stated that:
We use a microservice called range handler that keeps a record of all the taken and available ranges. The status of each range can determine if a range is available or not. The state—that is, which server has what range assigned to it—can be saved on a replicated storage.
This microservice can become a single point of failure, but a failover server acts as the savior in that case. The failover server hands out ranges when the main server is down. We can recover the state of available and unavailable ranges from the latest checkpoint of the replicated store.
My question is: is this microservice deployed always as a single instance? What about redundancy? Also, if we have a geo-distributed system, with let’s say one client is in EU and another is in US, there could be potentially a very big latency to the range handler is it is deployed as a single instance.
If there could be many instances of this service, how could it be sure that the range is not taken, since there is no way to obtain a lock?