Open yuvipanda opened 6 years ago
Some form of consistent hashing should probably give us what we want, I suspect. Gonna read up.
Because of how LTI works, the only unauthenticated endpoint the proxy should allow is a POST to /lti/launch, and this should go to our central dispatcher app.
This dispatcher should do a bunch of things, but central to it is:
This has the following consequences:
The sharder we built for the NFS storage situation automatically rebalances itself, so we might do something similar for here too! However we might need to do some performance optimizations there to make sure we're not doing too many SQL queries.
This should give us a complete load balancing setup with dynamically changeable hub counts for an LTI Based setup.
https://github.com/berkeley-dsep-infra/data8xhub/commit/0dd75fc770766bc9a5822fb21aaa0a7919b90a36 takes a first stab at this.
The edge proxy will only be routing to hubs based on secure routing cookie, and not do anything else.
This should work as is to begin with, but in the long run pose plenty of problems wrt balancing. We need an edge-user-assigner, which can authenticate LTI requests and direct people to an appropriate hub based on its internal knowledge of the users on each hub.
We now need a loadbalancing assigner of sorts. This should:
It looks like we'll end up with 30-40 hubs at max for this hub, so figuring out a load balancing strategy is important.
Requirements: