Thank you for your fast answer. I don't think this is a bad idea but I think that we can do better. I mean, if I have to use two different ports to distinguish writing and reading requests, I also have to open and handle these two ports on my network etc... This multiply the work by 2. This is a good idea but not the best. For me, the best way would be to add a GET variable in the connection URL like: " jdbc:neo4j://xxx.xxx.xxx.xxx/?action=write " or something like that we could retrieve in HAProxy. I don't know if this is possible and that's why I asked.
FakeGenius Le vendredi 28 novembre 2014 15:41:54 UTC+1, Lasse Westh-Nielsen a écrit : > > Hello, > > I think that is a fine solution you are proposing; it is similar to what I > wrote up in the manual here: > http://neo4j.com/docs/stable/ha-haproxy.html#_optimizing_for_reads_and_writes > > Why do you think it is a bad idea? > > - Lasse > > > > On Fri, Nov 28, 2014 at 12:00 PM, FakeGenius <[email protected] > <javascript:>> wrote: > >> Hi, >> >> Firstly, I have to say that my English isn't very good so please >> be lenient :). >> >> So i explain my problem: we have one cluster of Neo4J servers. One master >> and 2 or more slaves. >> I also use an HAProxy server to do the load balancing. Writing request >> goes to the master and reading requests goes to the slaves. >> Now, I want to use the Neo4J JDBC to send Cypher requests from a Java >> application. >> My problem is, how should I do to distinguish writing and reading >> requests in HAProxy ? >> >> I have found one solution: to make the HAProxy server listen to two port, >> for example 9000 and 9001. >> Writing request are sent to the port 9000 and reading request to the port >> 9001. But I don't think this is the best solution. >> >> I have also searched for a variable to set in the JDBC to do that thing >> but I haven't found anything. >> If someone have a better solution that mine, I would be happy to learn it >> :). >> >> Thank you for your help. >> >> FakeGenious, >> developper. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
