gpt4 book ai didi

java - 以编程方式扩展 ElasticBeanStalk 环境

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:46:12 24 4
gpt4 key购买 nike

如何在正在运行的应用程序 (Spring Boot) 中以编程方式添加更多实例(向上扩展)ElasticBeanStalk 环境?

我想过使用 AWSElasticBeanstalkClient,但找不到任何使用客户端添加实例的方法。

http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/elasticbeanstalk/AWSElasticBeanstalkClient.html

有什么提示吗?

我需要这个,因为我的应用程序设计是每个 App 节点需要相互通信以执行一些图像识别任务。

如果 EBS 无法做到这一点,我正在考虑如下所述以编程方式创建 EC2,我的问题是如何将我的应用程序部署到新创建的 EC2 实例。

http://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/run-instance.html

最佳答案

Cloudwatch 警报 + AutoScaling 是用于扩展 ElasticBeanstalk 应用程序的 AWS 引用架构。

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.managing.as.html

您可以让每个应用程序节点发布自定义的 cloudwatch 指标并根据该指标扩展您的 ASG。

https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html

关于java - 以编程方式扩展 ElasticBeanStalk 环境,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46741068/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com