nacos icon indicating copy to clipboard operation
nacos copied to clipboard

Support config grpc port directly without using offset.

Open JonasGao opened this issue 1 year ago • 5 comments

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.

JonasGao avatar Aug 15 '24 11:08 JonasGao

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

KomachiSion avatar Aug 19 '24 02:08 KomachiSion

liushuai8 avatar Aug 23 '24 08:08 liushuai8

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.

JonasGao avatar Aug 26 '24 08:08 JonasGao

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 avatar Aug 28 '24 03:08 KomachiSion

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 avatar Aug 28 '24 03:08 KomachiSion

No more response from author for a long time.

KomachiSion avatar Sep 13 '24 02:09 KomachiSion

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.它将不再被支持。客户端已经升级到新的连接方式并且比 HTTP 增强了很多,不需要再回到 HTTP。

Hello, due to the network security policy restrictions of our customer's production environment, only one communication port can be opened to the outside world. Under this condition, is there any way to use nacos? Thanks.

cwl12315 avatar Jun 03 '25 06:06 cwl12315