本文介绍了如何为多个(微)服务执行有效的通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

案例:包含许多微服务和内部服务的软件版本.

Case: Software build with many microservices and internal services.

疑问是如何管理性能问题(网络延迟,资源大小),如何一次从多个微服务中获取多个资源.

The doubt is how to manage performance issues (network latency, size of resource) getting multiple resources from many microservices at once.

我无法想象要发出20个HTTP请求来访问所有必要的资源.

I Just can not imagine making 20 HTTP requests to access all necessary resources.

推荐答案

为了减少所请求的数量,您可以创建一个封装传入API调用的外观.这使您摆脱了昂贵的网络往返路程.

In order to reduce the number of requests made you might create a facade that encapsulates incoming API calls. This enables you to get rid of expensive network roundtrips.

Netflix在博客中讲述了一个非常相似的挑战

Netflix blogged about a very similar challenge

http://techblog.netflix.com/2013/01/Optimization-netflix-api.html

http://techblog.netflix.com/2012/07/embracing-differences-inside-netflix.html

这篇关于如何为多个(微)服务执行有效的通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 04:25