Information Center

How to deploy microservices in hybrid cloud/multi cloud environment

  

Micro services can bring a lot of benefits to hybrid cloud or multi cloud deployment, but they can also bring new challenges related to network and security.

Most IT enterprises have begun to realize the benefits of implementing software componentization in development and deployment. In the cloud, componentization brings important advantages, such as increased flexibility and support for scale out.

Microservices (small functional components that are usually shared in applications) can significantly amplify these advantages. But first, users must plan, develop and deploy microservices correctly.

Learn how to make microservices work

To start planning microservices, the IT team needs to understand the differences between microservices and application components or elements in service-oriented architecture. Microservices are not complete application components; They are designed for sharing as services in applications - which means that multiple applications can call a single instance of microservice at the same time. Microservices are also designed to use network RESTful interfaces.

If microservices do not meet the above definition, they may not provide many benefits. When microservices can meet the above characteristics, users need to maintain each microservice in hybrid cloud or multiple cloud deployments.

The impact of microservices on multi cloud networks

Because microservices are small functional components, they can decompose applications into many continuous requests for external services. The network used to access services may introduce transmission delay and other network performance problems. Crucially, the network connection that links microservices and applications that use them to provide quality of service (QoS) needs to support the user experience. Before users deploy microservices, they should test the performance of microservices under all load changes across the user's hybrid cloud or multi cloud environment. If the user's quality of service is lower than the acceptable level, the network connection can be changed to correct it. In addition, users can design their own application deployment process so that services will not move to blind spots in the user's network.

Network performance problems in hybrid cloud and multi cloud applications are usually related to the way data traffic flows through multi cloud, cloud and data center, and boundary points. You can communicate with the user's cloud provider to let the user's VPN provider and the data center team work together to optimize network connectivity. Multi cloud applications should be handled with special care because many public cloud providers are not directly connected with other providers; They will want to connect through the user's VPN or data center network. If an application in one cloud uses a microservice in another cloud, there is a potential for long transmission delay. If users cannot reduce the delay time, they should try to avoid microservice access across cloud provider networks. Users may need to deploy a service replica in each cloud environment to avoid such network performance problems.

Access to microservices by multiple applications also requires special network optimization. The simplest way to access microservices is to assume that there is a private network connecting all the users' clouds and data centers. By using this method, users can deploy microservices anywhere, and applications can use the standard IP mechanism -- URL and Domain Name Service (DNS) or other service directory methods to let applications access them.

When microservices are migrated between different cloud providers or between cloud providers and data centers, another challenge will arise. In general, this migration requires changing the IP address, which means that the service logical name must be associated with different addresses after the microservice migration. Ensure that users have tools and measures for replacing faulty components, so as to make necessary modifications to DNS or service directory entries, so that users' applications can find new services at the new address of the microservice.

Securely deploy microservices

The fact that multiple applications often share a single microservice brings two other challenges in hybrid cloud and multi cloud environments: security and compliance, and stateful and stateless behavior.

Since applications are sharing functions at all times, there is a risk of violations for applications with strict compliance requirements. This is because shared services may leave an entry window for outsiders. Since migrating microservices or replicating microservices under load requires a fairly open addressing method, users need to ensure the security of each microservice and its access. Avoiding the mixing of microservices requires that the functions of security and compliance monitoring and other functions open to the larger community become two different microservices.

Explore stateful and stateless issues

Stateful and stateless issues are complex, even for software architects and developers. Applications typically support transactional activities that include multiple steps or states. For example, suppose we have a service called "adding two numbers". If we propose the first number in one request and the second number in another request, and other users may inadvertently introduce their own numbers between our two numbers, then we will get the wrong answer.

If the microservice cannot save data between the requests sent to it, it can make the request stateless if necessary or ensure that they can transmit the state in some way. In our example, providing two numbers to be added can save multiple requests and eliminate the risk of state behavior. In addition, the request can also contain a user ID that the microservice can associate with the status through the backend database. When we propose our first number, the microservice will record this number in the database. Then, when the second number is proposed, the microservice can add the two numbers and return the result.

There is always a good value for money price for versatility, agility and flexibility, and the use of microservices in hybrid cloud and multi cloud represents the three characteristics of our research leadership. Carefully plan, minimize the price and deploy microservices that can easily expand to the future of complex cloud.