我可以使用负载平衡器缩放的Azure服务应用布 [英] Can I use load balancer for scaling Azure Service Fabric apps

查看:153
本文介绍了我可以使用负载平衡器缩放的Azure服务应用布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

近日来了解Azure的服务及面料似乎开发扩展应用为一堆微服务的好方法。它到处是,告诉我们需要无状态的前端Web服务和有状态划分内部服务。内部服务<一个href=\"https://azure.microsoft.com/en-us/documentation/articles/service-fabric-concepts-scalability/#comments\"相对=nofollow>通过分割数据规模。

Recently came to know about Azure Service Fabric and seems a good way to develop scaling applications as bunch of micro services. Everywhere it is telling that we need to have stateless front end web services and stateful partitioned internal services. The internal services scale by partitioning the data.

但是在负载发生前端服务? .The机会是非常少的,因为他们在做什么,但依靠内部状态的服务。然而,我们应该使用前前端服务负载均衡?如果是这样,我们可以通过太面料服务的无状态模型中使用OWIN或任何其他虚拟主机托管的同?

But what happens to the front end services in load? .The chances are very less as they are doing nothing but relying to internal stateful services. Still should we use load balancer before front end services? If so, can we host the same too via Service Fabric's Stateless model using OWIN or any other web host?

问题已经被问SO而是作为评论。它没有得到答复,原来的问题是不同的。
的Azure服务使用布

The question is asked already in SO but as comment. It didnt get reply as the original question was different. Azure Service Fabric usage

推荐答案

是的,你肯定会想在您的无状态服务的负载分配,以及。的主要区别是,由于它们是无状态的,它们可以处理在一个循环方式的请求。

Yes, you'll definitely want to distribute load across your stateless services as well. The key difference is that since they are stateless, they can handle requests in a round-robin fashion.

鉴于有状态服务有隔板,其中映射到服务的状态的个别块,无国籍服务仅仅具有实例,它们是彼此相同的克隆,只是在不同的节点。可以设置实例的数目在上在应用程序清单的默认服务定义。例如,这个声明会保证有始终在群集中运行的状态服务的5个实例:

Whereas stateful services have partitions, which map to individual chunks of the service's state, stateless services simply have instances, which are identical clones of each other, just on different nodes. You can set the number of instances in on the default service definition in the application manifest. For instance, this declaration will ensure that there are always 5 instances of your stateless service running in the cluster:

<Service Name="Stateless1">
   <StatelessService ServiceTypeName="Stateless1Type" InstanceCount="5">
     <SingletonPartition />
   </StatelessService>
</Service>

您还可以设置InstanceCount为-1​​,在这种情况下,服务将布在每个节点上创建无状态服务的实例。

You can also set the InstanceCount to -1, in which case Service Fabric will create an instance of your stateless service on each node.

Azure的负载均衡器会循环赛跨越每个实例的传入流量。不幸的是,没有在一箱环境现在来模拟一个很好的方法。

The Azure load-balancer will round-robin your incoming traffic across each of your instances. Unfortunately, there isn't a good way to simulate this in a one-box environment right now.

这篇关于我可以使用负载平衡器缩放的Azure服务应用布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆