[英]involuntary disruptions / SIGKILL handling in microservice following saga pattern
Should i engineer my microservice to handle involuntary disruptions like hardware failure?我应该设计我的微服务来处理硬件故障等非自愿中断吗? Are these disruptions frequent enough to be handled in a service running on AWS managed EKS cluster.
这些中断是否频繁到足以在 AWS 托管 EKS 集群上运行的服务中处理。
Should i consider some design change in the service to handle the unexpected SIGKILL with methods like persisting the data at each step or will that be considered as over-engineering?我是否应该考虑在服务中进行一些设计更改以使用诸如在每个步骤中持久化数据之类的方法来处理意外的 SIGKILL,还是将其视为过度工程?
What standard way would you suggest for handling these involuntary disruptions if it is如果是,您会建议什么标准方法来处理这些非自愿中断
a) a restful service that responds typically in 1s(follows saga pattern). a) 一个安静的服务,通常在 1 秒内响应(遵循 saga 模式)。 b) a service that process a big 1GB file in 1 hour.
b) 在 1 小时内处理 1GB 大文件的服务。
There are couple of ways to handle those disruptions.有几种方法可以处理这些中断。 As mentioned here here :
如此处所述:
Here are some ways to mitigate involuntary disruptions:
以下是一些减轻非自愿干扰的方法:
- Ensure your pod requests the resources it needs.
确保您的 pod 请求它需要的资源。
- Replicate your application if you need higher availability.
如果您需要更高的可用性,请复制您的应用程序。 (Learn about running replicated stateless and stateful applications.)
(了解如何运行复制的无状态和有状态应用程序。)
- For even higher availability when running replicated applications, spread applications across racks (using anti-affinity) or across zones (if using a multi-zone cluster.)
为了在运行复制的应用程序时获得更高的可用性,请将应用程序分布在机架之间(使用反关联)或跨区域(如果使用多区域集群)。
The frequency of voluntary disruptions varies.
自愿中断的频率各不相同。
So:所以:
SIGKILL
the load is automatically directed to another Pod.SIGKILL
时,负载会自动定向到另一个 Pod。 You can read more about this here . I hope I cleared the water a little bit for you, feel free to ask more questions.我希望我为您清理了一点水,请随时提出更多问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.