2

I'm writing an application that will talk to the Ethereum network, I have decided to host my own Parity nodes in the cloud using GCP Kubernetes Engine. I set up 3 node replicas for increased availability.

Are there any implications associated with talking to a randomly load balanced node instead of always talking to the same node?

Would I have to account for the fact that I'm not always talking to the same node in my application code?

Edit: After some exploration I think the best way for me to handle this will be to send the same transaction to all nodes at the same time, instead of round robin load balancing.

  • Where are you managing your accounts? In the application or in the nodes? – ivicaa Feb 26 '18 at 11:12
  • In the application, submitting a signed transaction to the nodes. – Anurope Feb 26 '18 at 12:07
1

This problem is endemic to the use of IP addressing:

Generally speaking, IP provides a connectionless delivery service for variable size packets, which does not guarantee ordering, delivery, or lack of duplication, but is merely best effort (although some packets may get better service than others). Senders can send to a destination address without signaling a priori, and receivers just listen on an already provisioned address, without signaling a priori.

and sessions are not designed to handle this:

When using several application servers, then the problem occurs: what happens when a user is sending requests to a server which is not aware of its session? The user will get back to the login page since the application server can’t access his session: he is considered as a new user.

Several possible solutions can be used by themselves or combined:

Use a clustered web application server where the session are available for all the servers

Sharing user's session information in a database or a file system on application servers

Use IP level information to maintain affinity between a user and a server

Use application layer information to maintain persistance between a user and a server

References

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.