Microservice and Containerization Patterns > Interchange Patterns > Microservice Instance Registration
Home > Design Patterns > Microservice Instance Registration
Microservice Instance Registration (Erl, Naserpour)
How can microservice consumers locate and access available microservice instances at runtime?
Consumer programs that need to access microservices via regular API invocation need to bear the performance cost of invoking new microservice instances from scratch.
A microservice instance registry or registration system is implemented that provides active information about microservice instances and their associated business functions.
Microservices are commonly designed to self-register themselves in the microservice instance registry. Alternatively, semi-automated registration can be carried out, which relies on a third party to detect and record active instances.
A microservice instance registry is implemented. This registry is essentially a database of active and currently running microservice instances, their APIs and locations. When a new microservice is instantiated, that instance is registered in the microservice instance registry.
Microservice B queries the microservice instance registry to determine whether an instance of Microservice A is active and available.
This pattern can be applied by enabling microservice instances to be discovered and by further enabling the self-registration and semi-automated registration of microservice instances, as explained in the complete pattern description.