cyclestreets / cyclestreets-setup

Deployment scripts for installing CycleStreets website and related components
11 stars 5 forks source link

Routing engine import should set engine status #27

Open mvl22 opened 3 years ago

mvl22 commented 3 years ago

An import currently sets the response to have an error status of: Routing service unavailable.

This should be changed to: Data update in progress, which would enable load balancing or other checking systems to detect a known state.

si-the-pie commented 3 years ago

During restart of the routing service, V1 of the journey planner API does in fact return the error text: Data refresh in progress; please try again shortly, 503 HTTP and Status headers, and a Retry-After: 30 header.

However restarting the routing service takes only about 20 minues which is short compared with the many hours it takes to install the routing database on a target machine. The install is disk and cpu intensive and causes significant performance degradation, especially if the server is busy or is a VM on a busy host. What is needed is a method of diverting routing away from the target machine at the loadbalancers for the whole several hours duration of the installation.

mvl22 commented 3 years ago

However restarting the routing service takes only about 20 minutes which is short compared with the many hours it takes to install the routing database on a target machine.

Yes, this is specifically the thing that needs to be changed to have the message appear throughout rather than just the first bit.