3 ms·
Maybe I missed this in the link but I didn't see how one of the common problems in a distributed application is addressed: * A POST request is redirected to th
by damagednoob 5y ago
Maybe I missed this in the link but I didn't see how one of the common problems in a distributed application is addressed:
* A POST request is redirected to the primary data source, the resource is created and the id is returned
* A GET request is immediately issued for that id but the resource that has not been replicated to the regional data source
* :boom:
- mrkurt 5y agoOur Rails gem pins requests to the primary region until the data is replicated. We talk about this more here: https://fly.io/blog/globally-distributed-postgres/ https://fly.io/blog/globally-distributed-postgres/
- allknowingfrog 5y agoThe article touches on this "create-and-redirect-to-show" pattern at the end of the "It's not actually magic" section. https://fly.io/blog/run-ordinary-rails-apps-globally/#it-s-not-actually-magic https://fly.io/blog/run-ordinary-rails-apps-globally/#it-s-n...