I maintain a small open source library for managing payments websites that uses this architecture [1]. My Lambda costs have been about $0.04 per transaction.
Also you can provision AWS from the browser using a CloudFormation template and a Launch Stack URL [2].
It lacks some of the features you'd get with a dedicated backend service but it's truly static and costs about $0.004/transaction on AWS Lambda (not including Stripe's take).
I haven't, but even at this size the rendering is quite a bit slower than the calculation. For example, the delay on reload is almost entirely from rendering the shortest path tree.
The geographic rendering APIs tend to be incompatible with the graphing algorithms and data structures. It's better to optimize your data on the server for algorithmic simplicity and convert to a render-friendly format at render time.
Also, immutability is great when you're juggling 1000s of lon/lat arrays.
k-Shortest Path. A, at the first glance reasonable, approach to alternative routes is the k-shortest path problem [Yen71]. The basic notion behind the problem, which has been studied quite extensively (e.g. [Shi79, Epp94, Epp98, Rup97]), is that next to the shortest path itself, slightly suboptimal paths will offer good alternatives. While this idea seems valid for specific networks2, it has been described as less effective [BDGS11] in the context of alternative routes in road networks. It is rather unlikely to find a good alternative route among the first few hundred paths. Jumping off the highway at a ramp and directly returning back onto it does not take much time compared to the full journey. Doing this at every possible combination of ramps might already contribute a large number of possible paths that are only slightly worse than the original shortest path. This directly implies that we might need a very large value for k before we can report a reasonable alternative route.
You can also change the definition of "shortest" by weighting roads by speed limit. I don't know if the data for that is easy to come by, but you can always use some arbitrary weights to get roughly the same effect.
Also you can provision AWS from the browser using a CloudFormation template and a Launch Stack URL [2].
[1]: https://github.com/christophercliff/flatmarket. [2]: https://github.com/christophercliff/flatmarket#automated-dep...