Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is routing mode enabled with neo4j+s protocol? #106

Closed
Papillon6814 opened this issue Jun 24, 2022 · 6 comments
Closed

Is routing mode enabled with neo4j+s protocol? #106

Papillon6814 opened this issue Jun 24, 2022 · 6 comments

Comments

@Papillon6814
Copy link

Papillon6814 commented Jun 24, 2022

Hello. I have a question.
I set a url like below for connecting to a cluster database in AuraDB

config :bolt_sips, Bolt,
  url: "neo4j+s://********.*******.neo4j.io",
  basic_auth: [username: "*******", password: "*************"],
  pool_size: 10,
  ssl: true,
  max_overflow: 2,
  queue_interval: 10_000,
  queue_target: 30_000,
  prefix: :default,
  timeout: 600_000

The url starts with "neo4j+s" and not "neo4j". Then my Bolt.Sips.conn() would be:

iex(1)> Bolt.Sips.info
%{
  default: %{
    connections: %{
      direct: %{"***********************.neo4j.io:7687" => 0},
      routing_query: nil
    },
    user_options: [
      basic_auth: [
        username: "******",
        password: "******"
      ],
      socket: :ssl,
      port: 7687,
      routing_context: %{},
      schema: "neo4j+s",
      hostname: "*****************.io",
      with_etls: false,
      url: "neo4j+s://****************io",
      ssl: true,
      pool_size: 10,
      ssl: true,
      max_overflow: 5,
      queue_interval: 10000,
      queue_target: 30000,
      prefix: :default,
      timeout: 600000
    ]
  }
}

I think it is direct mode, but I think I need to connect as routing mode when I connect to a cluster. How to do it?
Thank you.

@florinpatrascu
Copy link
Owner

Hi there. From the docs:

:url- a full url pointing to a running Neo4j server. Please remember you must specify the scheme used to connect to the server. Valid schemes: bolt,bolt+routing and neo4j - the last two being used for connecting to a Neo4j causal cluster.

neo4j will suffice. I believe their "+s" stands for secure?! But I am not familiar with that. Just make sure you enable ssl, for your connection like you did in your example.

@Papillon6814
Copy link
Author

Thank you for the prompt response!
So, neo4j+s protocol cannot enable routing mode, can it?

@florinpatrascu
Copy link
Owner

Thank you for the prompt response!

of course, np.

So, neo4j+s protocol cannot enable routing mode, can it?

There is no mention of neo4j+s, in our docs, is it?! ;) When the user is configuring the driver with a schema we do not recognize/support, the driver defaults to :bolt - aka the :direct (non-cluster) mode. Maybe that's what you were experiencing when you mentioned the timeout story, but the info provided was insufficient to conclude the possible reason.

@Papillon6814
Copy link
Author

Papillon6814 commented Jun 24, 2022

here is no mention of neo4j+s, in our docs, is it?! ;) When the user is configuring the driver with a schema we do not recognize/support, the driver defaults to :bolt - aka the :direct (non-cluster) mode.

I got it, thank you for the information. It really helps me!

I had thought neo4j+s protocol was famous because it is a default protocol if we create a database instance in AuraDB. (AuraDB is a partner of GCP) But is it not so famous actually?

@florinpatrascu
Copy link
Owner

It's simpler than you think. At the time when I implemented the support for connecting to a cluster, neo4j+s was not yet a thing :)

@Papillon6814
Copy link
Author

I got it! Okay, thank you for telling me them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants