Implementing security and cross-cutting concerns like security and authorization on every microservice can require significant development effort. How can you handle cross-cutting concerns such as authorization, data transformations, and dynamic request dispatching?.This approach reduces latency, since multiple pieces of data come back in parallel and some UI can show data as soon as it's ready. Ideally, responses should be efficiently aggregated in the server side. This approach increases latency and complexity on the UI side. Interacting with multiple microservices to build a single UI screen increases the number of round trips across the Internet. How can client apps minimize the number of requests to the back end and reduce chatty communication to multiple microservices?. However, when you build large and complex microservice-based applications (for example, when handling dozens of microservice types), and especially when the client apps are remote mobile apps or SPA web applications, that approach faces a few issues.Ĭonsider the following questions when developing a large application based on microservices: In any case, a load balancer and ADC are transparent from a logical application architecture point of view.Ī direct client-to-microservice communication architecture could be good enough for a small microservice-based application, especially if the client app is a server-side web application like an ASP.NET MVC app. This approach improves the load of your hosts by offloading CPU-intensive SSL termination and other routing duties to the Azure Application Gateway. This layer acts as a transparent tier that not only performs load balancing, but secures your services by offering SSL termination. In production environments, you could have an Application Delivery Controller (ADC) like Azure Application Gateway between your microservices and the Internet. In a production environment based on a cluster, that URL would map to the load balancer used in the cluster, which in turn distributes the requests across the microservices. An example of a URL for a particular service could be the following URL in Azure: In this approach, each microservice has a public endpoint, sometimes with a different TCP port for each microservice. Using a direct client-to-microservice communication architecture In this approach, a client app can make requests directly to some of the microservices, as shown in Figure 4-12.įigure 4-12. Direct client-to-microservice communicationĪ possible approach is to use a direct client-to-microservice communication architecture. This fact can impact the client-to-microservice communication, as explained in this section. In a microservices architecture, each microservice exposes a set of (typically) fine-grained endpoints.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |