Sagecell Load balancing problem

19 views
Skip to first unread message

이용현

unread,
Jul 5, 2023, 3:25:51 AM7/5/23
to sage-cell
Hello.

I have a question about sagecell & load balancing.

The current setup status of the sagecell server is as follows.

We set up a sagecell web server in two AWS ec2 instances, and load balancing was performed in one domain to reach two pages.

The ports used to run web_server.py on each instance use the same port number.

Later, after entering the code into the sagecell page that was displayed in the two instances and pressing the evaluate button, the code execution result value did not appear in the middle.

It was a problem that didn't happen when I was operating with one instance before, is there a problem with using sagecell with this setting?

Andrey Novoseltsev

unread,
Jul 6, 2023, 10:47:19 PM7/6/23
to sage-cell
Hello,

It is great to hear that you are experimenting setting up servers and it is mostly working!

To run a computation there are multiple requests and connections between the client and the server. It is essential that all of them are routed to the same server. Our public setup uses load balancing between containers even on a single machine to improve resilience - if one container crashes, others are available while the crashed one reboots. For HA-Proxy you can replicate configuration from here:
for other load balancers the idea is to do something similar - extract the session/kernel ID from the URL or header and use it for routing.

Hope this helps, please let me know about your progress!

Andrey

Reply all
Reply to author
Forward
0 new messages