Micro-services part[06]

Udhaya Rajendram
3 min readJul 23, 2022

--

Proxy Pattern

The most well-known subject is microservices. Since it has emerged as the best option for contemporary applications, the micro-service architecture is currently regarded as a well-known one. Most apps now have a micro-services architecture instead of a monolithic one. Each of these architectures has advantages and disadvantages.

Why do design patterns need to be used in microservices? we will go over each of the design patterns that are available for micro-services. The most important factor in selecting the best design pattern. If you don't pick the proper one, your application will shut down as it approaches a specific point

Proxy Pattern

Everyone has a basic understanding of what a proxy is, but many people are unaware of how a proxy is used, let’s have a look at an example before discussing the proxy pattern. Let’s say you have a client that is ready to go from a monolithic architecture for his business. Due to its ongoing development over the course of its life,micro-services are extremely beneficial when dealing with agile. Some services may need updates as functionalities and queries. A particular service update may have an impact on other services as well(the service which is connected). The result will be a system failure. We can utilize the proxy design pattern to resolve this. The only difference between this and the aggression design pattern is that instead of aggregation, depending on the business need, a separate micro-service may be invoked. The main goal of this paradigm, which can scale independently, is to avoid making each service accessible to users through an interface.

There are major, minor, and patch versions of the semantic version.

When a new version is incompatible with an earlier or current, you increment the major version.

Every time you add new features, you increment the minor version, but the initial or previous service will continue to function,

Users have the option of changing to the new version if they desire it or sticking with previous functionality.

The patch version is largely irrelevant, and you can update it any way you choose.

Service Discovery Tool: For the service discovery tool, you can use the ws02) register. Since your service is independent, a service discovery tool is crucial. Based on the values of the parameters given, the proxy will this discovery tool and ask for either the student version 1 or version 2.

Message Queues: Message queues will store the messages in a queue, and will store the messages in a queue, and the queue processor will process them one by one into the database. This is required when the database takes a long time to save the data in the DB(important when the DB takes a lot of time to respond).

Timeout: When using a proxy service you should take time out into consideration. Assume that your student version 1 is being used more and more. Version 2 may also be impacted by the blocked thread if the time-out has not been introduced.

--

--