Comments (9)
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Feature-request
-
Register on Polaris, and the service name and agreement are directly spliced together.
-
There are some problems with the input of the protocol field during registration.
-
The current service name after registration
![image](https://user-images.githubusercontent.com/32378959/273356887-6abfc255-2e08-4939-ab23-87b2e3b998a7.png)
- At present, the protocol field cannot be filled in at all, because after writing it, the two registered service instances will have the same protocol tag. According to the design, the corresponding protocol fields should be filled in directly in the Kratos registration implementation code, so it is useless for developers to fill it in here.
![image](https://user-images.githubusercontent.com/32378959/273357054-81e19fc5-a09a-489d-9510-53e21c1202c0.png)
![image](https://user-images.githubusercontent.com/32378959/273357170-2ecb3ef4-66f2-42c0-8058-e22ec7e4a02f.png)
Proposal
-
When registering on Polaris, it should not be a direct concatenation of service name + protocol. There should be at least a separator, such as rc-user.http or rc-user-http. Although it does not affect use currently, I think this is also a norm.
-
The protocol fields for registered service instances should be specified internally in the contrib/registry/polaris/registry.go file in the Kratos project instead of being passed in by developers.
![image](https://user-images.githubusercontent.com/32378959/273357406-4e71c66b-7571-4fad-8a24-beab2bc840c2.png)
from kratos.
Which SDK is being used? contrib/registry/polaris
or contrib/polaris
from kratos.
you can try using contrib/polaris
from kratos.
All right , I am currently using contrib/registry/polaris
from kratos.
But contrib/registry/polaris
more in line with framework usage for kratos
from kratos.
subsequent collaborations with Polaris will be conducted in contrib/polaris
from kratos.
ok. I switch to contrib/polaris
from kratos.
我已经使用了 contrib/polaris
包进行了注册,我发现现在的实现逻辑是 同一个服务名称 下 注册实例是通过协议区分的。这确实更符合注册逻辑,非常科学
![image](https://user-images.githubusercontent.com/32378959/273366690-aff13b8d-3e01-499b-9ba0-4a0b8223cb54.png)
![image](https://user-images.githubusercontent.com/32378959/273366727-985d8af7-208c-4c05-8ca5-8c558e8bde38.png)
但是我想问下,关于限流,那现在是不是不能根据协议进行区分 限流规则了?比如同一个接口 http 我想 1分钟 1次请求,grpc 1分钟 2次请求的配置,这种现在能支持吗?
from kratos.
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
I have used the contrib/polaris
package to register, and I found that the current implementation logic is that registered instances under the same service name are distinguished by protocols. This is indeed more in line with the registration logic and very scientific
![image](https://user-images.githubusercontent.com/32378959/273366690-aff13b8d-3e01-499b-9ba0-4a0b8223cb54.png)
![image](https://user-images.githubusercontent.com/32378959/273366727-985d8af7-208c-4c05-8ca5-8c558e8bde38.png)
But I would like to ask, regarding current limiting, is it not possible to distinguish current limiting rules based on protocols? For example, I want to configure the same interface http to request once per minute, and grpc to request twice per minute. Can this be supported now?
from kratos.
Related Issues (20)
- [Question] How to log Http method? HOT 3
- [Question] How to install a specific version of kratos ? HOT 1
- [Question] why trace_id and span_id in logger ctx? HOT 1
- [Feature] allow custom signal to do some handle logic HOT 1
- [Question] When using http, if I want to set timeouts for different routes, how should I set them? HOT 2
- I have a question about proto. HOT 2
- apollo settings Watch cannot hot update configuration normally
- http.NewClient results in NODE_NOT_FOUND HOT 2
- load apollo config yml format panic HOT 5
- [Question] 如何使用json.Marshal 作为http server 返回的序列化工具 HOT 2
- [Question] The middleware is Executed at the end of the request? HOT 7
- [Question] trace.id is not passed HOT 5
- [Question] How to limit HTTP request size? HOT 6
- The trace_id between requests is getting mixed up HOT 4
- [Question] How should I create a kratos project HOT 1
- net: lookupIPAddr dns resolving panic by data race. HOT 4
- [Question] The pprof profile is not valid HOT 4
- [Feature] Replace `PGV` by `protovalidate` HOT 7
- [Question] Pubsub Implementation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kratos.