[英]Service fabric Stateful service - Scaling without partitioning?
I am planning to migrate my existing cloud monolithic Restful Web API service to Service fabric in three steps. 我计划通过三个步骤将现有的云整体式Restful Web API服务迁移到Service Fabric。 The Memory cache (in process) has been heavily used in my cloud service.
内存缓存(正在处理)已在我的云服务中大量使用。
Step 1) Migrate cloud service to SF stateful service with 1 replica and single partition. 步骤1)将云服务迁移到具有1个副本和单个分区的SF状态服务。 The cache code is as it is.
缓存代码保持原样。 No use of Reliable collection.
不使用可靠收集。
Step 2) Horizontal scaling of SF Monolithic stateful service to 5 replica and single partition. 步骤2) SF整体状态服务的水平扩展到5个副本和单个分区。 Cache code is modified to use Reliable collection.
缓存代码已修改为使用可靠收集。
Step 3) Break down the SF monolithic service to micro services (stateless / stateful) 步骤3)将SF整体服务分解为微服务(无状态/有状态)
Is the above approach cleaner? 以上方法更清洁吗? Any recommendation.?
有什么建议吗? Any drawback?
有什么缺点吗?
More on Step 2) Horizontal scaling of SF stateful service 有关步骤2)SF状态服务的水平扩展的更多信息
Can all of the replica including secondory listen to my client request and respond the same? 包括secondory在内的所有副本都可以侦听我的客户请求并响应吗? GET shall be able to execute , How PUT & POST call works?
GET将能够执行,PUT&POST调用如何工作?
Should i prefer using external cache store (Redis) over Reliable collection at this step? 我是否应该在此步骤中使用外部缓存存储(Redis)而不是可靠的收集? Use Stateless service?
使用无状态服务?
This document has a good overview of options for scaling a particular workload in Service Fabric and some examples of when you'd want to use each. 本文档很好地概述了用于扩展Service Fabric中特定工作负载的选项,以及一些有关何时使用它们的示例。
Option 2 (creating more service instances, dynamically or upfront) sounds like it would map to your workload pretty well. 选项2(动态或预先创建更多服务实例)听起来像可以很好地映射到您的工作负载。 Whether you decide to use a custom stateful service as your cache or use an external store depends on a few things:
您决定使用自定义状态服务作为缓存还是使用外部存储取决于以下几件事:
To answer some of your other questions: 要回答您的其他一些问题:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.