Conflicting app versions when using Meteor with Cloudfront

If you use Cloudfront and a CDN you run into issues when updating your app. If you have 2 instances running and instance 1 is on version 1 and instance 2 is on version 2 (which will happen for a period while you update) then if a user is connected to instance 2, but Cloudfront connects to instance 1, the user won’t be able to use the app.

One suggested way around this was to write a script to upload these files to AWS S3 before each deploy to the servers. Has anyone had success with this technique or can advice on a different way around this issue?

There is a special query string parameter that you can send that will direct a request to a particular version of your app on Galaxy, so Cloudfront always connects to the right version of the app: http://galaxy-guide.meteor.com/cdn.html

1 Like

Right. I’m talking about when you don’t use Galaxy.