php如何使服务负载均衡权重控制生效?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- php
- Domain
- backend, distributed-systems
Research direction
The issue does not name any PHP files or tests. Start by locating the service-consumer load-balancing implementation and compare its behavior with the referenced ConsumerApplication.java and NacosRule example. Done means weights configured in the Nacos console affect PHP service selection rather than always using round-robin.
Written by the indexing model from the issue text.
Description
java服务是这样的:
实现在Nacos控制台上配置服务权重
Nacos默认是轮询。此时在控制台上修改服务的权重是无效的,仍然是轮询。
可以在消费者Consumer的代码上面加上:
ConsumerApplication.java
@Bean
@Scope(value = "prototype")
public IRule loadBalanceRule()
{
return new NacosRule();
}
这样就可以支持在控制台上手动配置权重了。
————————————————
版权声明:本文为CSDN博主「mxb1234567」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/mxb1234567/article/details/109532872
- Dominant language
- PHP
- Stars
- 22
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hyperf/nacos
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
请求支持Nacos v2接口Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
不支持nacos2.0的接口Open
Difficulty 4/5 3-5 days Newbie friendliness 15/100
-
提示是持久性服务,无法注册临时实例。Open
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
mailcow/mailcow-dockerized#7652 · 2 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
benjaminkott/bootstrap_package#1675 ·