Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supports traffic warm-up when the service is just started #4598

Open
chengyouling opened this issue Nov 14, 2024 · 1 comment
Open

Supports traffic warm-up when the service is just started #4598

chengyouling opened this issue Nov 14, 2024 · 1 comment

Comments

@chengyouling
Copy link
Contributor

chengyouling commented Nov 14, 2024

能力:支持对刚启动服务实例流量预热,流量曲线增加,流量预热时间结束后与其他实例均等。
方案:
计算每个实例的权重,根据权重选择一个实例作为负载使用。
1、权重计算
默认每个实例权重为100,预热实例权重为Math.round(Math.pow(实例运行时间/ 设置的预热时间, 曲率) * 默认权重100)
2、选择实例
当存在需要预热实例时(即设置的预热时间未结束),根据计算的权重选择实例返回负载;当不存在需要预热的实例时,全部实例返回。

@chengyouling chengyouling self-assigned this Nov 14, 2024
chengyouling added a commit to chengyouling/servicecomb-java-chassis that referenced this issue Nov 14, 2024
@liubao68
Copy link
Contributor

我们可以结合容器机制来做一些预热,上述方案并不好。 参考: https://developer.huaweicloud.com/programs/opensource/contributing/task-detail/37770335895c412ca7bcbff2e7e62e40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants