alibaba / nacos

an easy-to-use dynamic service discovery, configuration and service management platform for building cloud native applications.
https://nacos.io
Apache License 2.0
30.01k stars 12.8k forks source link

Support config grpc port directly without using offset. #12495

Closed JonasGao closed 1 day ago

JonasGao commented 1 month ago

Is your feature request related to a problem? Please describe. A nacos cluster running in my kubernetes cluster. A spring boot application will running out of the kubernetes. Now, the application can not access the nacos that in the kubernetes cluster. Because:

  1. 2X nacos client using GRPC access to nacos. But ingress only work for HTTP or HTTPS
  2. Nacos client not use the port 8848, it using 8848 + 1000.

I tried export nacos by NodePort Service, the port will be random, like 32705. If you use the configuration of the offset, the only way is port to 31705. Or calculate 32705 - 8848.

Describe the solution you'd like

  1. Add a spring cloud nacos property for GRPC port, like spring.cloud.nacos.discovery.grpc-port
  2. Add a spring cloud nacos property for OFFSET, like spring.cloud.nacos.discovery.grpc-port-offset
  3. Add spring cloud nacos properties and logics, to support disable GRPC, back to HTTP.
  4. Or directly use spring.cloud.nacos.discovery.server-addr. Just spring.cloud.nacos.discovery.server-addr=172.16.30.250:9848

Describe alternatives you've considered I will use eureka or consul or kubernetes builtin. Stay far far far away from NACOS.

Additional context No additional context.

Life is short, stay away from NACOS. Especially spring cloud nacos.

KomachiSion commented 3 weeks ago

https://nacos.io/docs/latest/manual/user/java-sdk/properties/#24-%E8%BF%9E%E6%8E%A5%E7%9B%B8%E5%85%B3

liushuai8 commented 3 weeks ago

JonasGao commented 2 weeks ago

https://nacos.io/docs/latest/manual/user/java-sdk/properties/#24-%E8%BF%9E%E6%8E%A5%E7%9B%B8%E5%85%B3

Thank you for your reply, I deleted suggest 2.

KomachiSion commented 2 weeks ago

Add spring cloud nacos properties and logics, to support disable GRPC, back to HTTP.

It will not be supported. client has upgrade to new connection way and enhance a lot of than HTTP, no need to back to HTTP.

KomachiSion commented 2 weeks ago

Why nacos community don't to support direct config grpc port.

The design is for most of user to easy to upgrade and use it.

For old version user, when they upgrade to version client, they only upgrade version is ok, not need to config grpc port.

And for most new users. Also only config the main port, and client will auto calculate the grpc port.

If the grpc port and http port is different relative with default, use offset setting can support it, because for this little percent users, they know the grpc port clear and modifies the link port in vip/slb.

KomachiSion commented 1 day ago

No more response from author for a long time.