When you make the switch to microservices, you’re investing in agility — but as with any investment, you should make sure the benefits and risks align with your goals. Successful microservices architecture (MSA) is more complex than traditional application architectures and therefore demands more effort and discipline to design, build and manage it.
But MSA promises to speed development life cycles and support scalability with volatile workloads. “The superpowers of MSA can, in large part, be attributed to the benefits of loose coupling and decomposing systems into component services that can be developed, deployed and operated independently of each other,” says Gary Olliffe, research vice president at Gartner.
MSA supports and manages rapid change. You will therefore need a versioning strategy for your services and interfaces
“Technical professionals who remain highly focused on loose coupling systems will find this approach can be applied to many design decisions they’ll need to make,” explains Olliffe.
These four steps can help technical professionals to achieve their MSA goals.
Step 1: Define your dependency management strategies
Use distributed configuration to decouple services from the environment: Configuration information can include topic names, queue names, database names and other environmental data. A runtime platform or a stand-alone solution can provide your distributed configuration management.
Use service discovery to decouple services from each other. A service registry application programming interface (API) enables a provider service to register its availability. “The registry can also let consumers discover and connect to service endpoints,” says Olliffe. “This resolution into a service endpoint can be managed on the client side or the service side. Both models keep the link as late-bound as possible to allow the life cycles of consumer and provider instances to be decoupled.”
Step 2: Iterate to identify and extract services
Iterate from the very start. One of the fundamental goals of MSA is to support rapid, fluid iteration of application delivery — this should happen from the beginning.
Use decomposition strategies. Don’t make your transition a “big bang” explosion, and don’t make the minimum viable product for a new application rely on the delivery of tens or hundreds of independent microservices.