vesoft-inc / nebula-python

Client API of Nebula Graph in Python
194 stars 76 forks source link

What IP Address should we use when calling init method on ConnectionPool #245

Closed porscheme closed 1 year ago

porscheme commented 1 year ago

General Question

Can someone tell what IP Address should we use when calling init method on ConnectionPool

Below code snippet is from official nebula-python release docs

# define a config
config = Config()
config.max_connection_pool_size = 10
# init connection pool
connection_pool = ConnectionPool()
# if the given servers are ok, return true, else return false
ok = connection_pool.init([('127.0.0.1', 9669)], config)

@wey-gu

wey-gu commented 1 year ago

Service IP is good, as session is the only stateful context here, for graphd(stateless), you could use one single service IP of all graphD(if they are Homogeneous), but also you could list all graphd nodes' IP.

In former case, the load-balancing was done by k8s service, and in latter case, it's load was balanced by the client side.

Please note this only applied to graphd, not for storaged/metad, which are stateful.

QingZ11 commented 1 year ago

We have noticed that the issue you created hasn’t been updated for nearly a month, is this issue been resolved? If not resolved, can you provide some more information? If solved, can you close this issue?

Thanks a lot for your contribution anyway 😊