amazon-web-services - Amazon Beanstalk 上 is_leader 标志的确切行为是什么?

标签 amazon-web-services distributed amazon-elastic-beanstalk

“is_leader”标志在 Amazon Beanstalk 部署上的具体行为是什么?我找不到任何关于它的详尽文档。更具体地说:

  1. 单实例环境的值(value)是什么?
  2. 当手动或通过自动扩展从环境中添加/删除节点时,Amazon 是否正确重置 is_leader 值?
  3. 如果 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/

相关文章:

java - 在网络上共享对象(区 block 链)

distributed - 为什么 paxos 接受者必须发回他们已经接受的任何值

linux - Elastic Beanstalk 上的 PostgreSQL (Amazon Linux 2)

amazon-web-services - 使用 Github OAuth 在 S3 上的静态站点?

node.js - 如何将 sns 发布到特定端点?

amazon-web-services - Neptune 加载程序 FROM_OR_TO_VERTEX_ARE_MISSING

java - 更新时从服务器到客户端的 RMI 通知

python - Django:部署到 ElasticBeanstalk myapp.settings 上导入错误

node.js - "no data"通过 beanstalk 部署 Node 应用程序时的健康状态

ios - Apple 应用程序站点关联无法通过 AWS CloudFront 和 S3 运行