“is_leader”标志在 Amazon Beanstalk 部署上的具体行为是什么?我找不到任何关于它的详尽文档。更具体地说:
- 单实例环境的值(value)是什么?
- 当手动或通过自动扩展从环境中添加/删除节点时,Amazon 是否正确重置 is_leader 值?
- 如果 Amazon 自动为节点重置该标志,Amazon 是否会负责重新启动实例以确保应用程序考虑该标志?
最佳答案
is_leader
是一个标签,由 AWS 部署过程应用于第一个创建的实例。正如您提到的,关于 is_leader
的文档非常稀缺,以下是我能找到的内容:
The idea of a leader only exists during the execution of a deployment in an environment update. After deployment has executed, there isn't a concept of a leader anymore, though you could determine which instance had been the leader if needed for debugging purposes.
您的问题的答案:
What is the value on a single instance environment?
is_leader
不适用于单实例环境,因此不设置该标签。
Does Amazon properly reset the is_leader value when nodes are added/removed from an environment, either manually or via auto-scaling?
领导节点不能免于被从环境中删除。如果它被删除,就不会重新分配“领导者”。有一些方法可以防止它被 AutoScaling 关闭:Configure Instance Termination Policy for Your Auto Scaling Group
If that flag is automatically reset by Amazon for a node, does Amazon take care of restarting the instance to make sure that flag is taken into account by the application?
该标志未重置。一旦领导节点从环境中消失,标签只会在重建时重新出现。
来源:
关于amazon-web-services - Amazon Beanstalk 上 is_leader 标志的确切行为是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20478362/