| Summary: | Orion server blocks requests during startup | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> |
| Component: | Server | Assignee: | John Arthorne <john.arthorne> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | 11.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
John Arthorne
One solution would be to defer initializing the user property cache until needed, or do it asynchronously outside of the bundle startup. However this cache is needed to lookup a user by id or email, which is needed by authentication, etc. So the server is not entirely useful until this initialization completes. Another solution is to expose an endpoint which triggers any kind of server "warmup" such as populating the user cache. This allows a load balancer or deployment automation system to avoid the server taking traffic before it is fully prepared to take requests. Monitoring of Orion server liveness is often done by doing a "wget" on the server about page, so that endpoint could be used to trigger warmup operations such as the user cache. Yet another solution is to store the user cache in some persistent store, to avoid the cost of computing it on startup. This adds complexity to the server metadata and makes user management more complex (today you can remove a user simply by removing or unlinking their workspace directory). It's not the most elegant solution, but I have released this simple fix that allows us to validate the problem in a large scale Orion install: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=fe1ab55ba63976fc0245780caa4c334c4eef67bf I have also added logging of the two most expensive init steps so we can confirm how long they are taking: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=13c308d2b5286cf4952a2715948a55c30629e5c3 Confirmed that this fix works as expected for a large Orion install. |