SHARING LEARNING OF MICROSERVICES ARCHITECTURE IMPLEMENTATION
- Find the best microservices architecture
- Outline your microservices
- Domain-Driven Design
- Get everyone onboard
- Utilize RESTful APIs
- Build teams for specific microservices
- Setup server and data storage environment
- Use the best DevOps toolkit
- Monitoring is key
#1: DETERMINE IF THE MICROSERVICES ARCHITECTURE FITS YOUR REQUIREMENTS
Amazon, Twitter, eBay, and PayPal are examples of organizations that have successfully implemented the microservices architecture design. It‘s a popular pattern, however, that doesn‘t mean it will work for you.
If you can‘t break down your web app into functions that provide value then the microservices architecture won’t make sense for you. Read “Pattern: Decompose by business capability” for more insights.
#2: DEFINE YOUR MICROSERVICES
You need to make a clear differentiation between your business functions, your services, and microservices. Without this, there is a possibility that you will build microservices that are too large. This is a form of under-fragmentation, and you will see no benefits from using the microservices approach.
#3: USE ‘DOMAIN-DRIVEN DESIGN’ (DDD) TO DESIGN MICROSERVICES
While this step is closely related to the exercise of defining your microservices, it goes one step further. Here, you design your microservices around your business domains. Let‘s review the Netflix example once more. They run their content delivery and different tracking services from separate servers.
’Domain-Driven Design‘ (DDD) is a design principle that expresses an object-oriented model using practical rules and ideas. It helps software architects to understand the differnt business domains, therefore, they can build a microservices architecture that the business can understand well. Read more about it in “DDD 101 — the 5-Minute tour”.
#4: GET EARLY BUY-IN FROM THE ORGANIZATIONAL LEADERS AND THE TEAM
Implementing the microservice architecture design isn’t simply a technical decision. Such a transformation is expensive, moreover, the impact goes beyond just the in-house development team. The transition from a monolithic architecture is a long-drawn out project. The senior management in the organization must commit the funds for it.
#5: USE RESTFUL APIS OPTIMALLY
The microservices architecture pattern can deliver a significant value if you make optimal use of RESTful APIs. RESTful APIs offer numerous advantages, for e.g., you don’t need to install anything on the client side. You don’t need SDKs or frameworks since HTTP requests to consume the API service is sufficient. Read more about the advantages of RESTful APIs in this Quora Q&A thread.
#6: PROVISION OF SEPARATE DATA STORAGE FOR EACH MICROSERVICE
Each microservice should have provision for its‘ data storage. Each microservice should fully own its’ data. Of course, data can be shared between microservices, however, this should happen via APIs.
If multiple microservices share the same data storage, this will lead to coupling between services. This will defeat the purpose of the microservices architecture considerably. Read more about it in “Top 5+ microservices architecture and design best practices”.
#7: USE A GOOD DEVOPS TOOLSET
By now, you should have designed your microservices well enough to deploy them independently. To realize optimal value from these microservices, you need to automate build and deployment management. Therefore, you will need a good set of DevOps tools.
#8: INVEST IN MONITORING
If you were using a monolithic architecture and are transitioning to a microservices architecture, you have to address increased complexity. Increased demand for performance and the dynamic environment requires more advanced monitoring.
No comments:
Post a Comment