We are being forced to have servers in France due to privacy laws, so local mongoDB, meteor server etc.
How can the client switch servers on the fly? We tried all different combinations of Meteor.connect and DDP.connect and we still can’t log in to another server.
No one? Am I the only one facing this? @sashko, some direction would be appreciated if you have a moment.
I would expect international sites to want to direct to local servers to reduce latency and distribute load.
I noticed that Meteor.subscribe (and other functions) simply point to the current connection’s subscribe method. Should we just replace these functions manually or use the cumbersome approach of calling subscribe of a new DDP.connect() response?
Connect to another container running the same exact App elsewhere. E.g. we deploy in US and Europe. When a user connects, we notice they are in Europe and have the App point to the European site.
Why not just connect to the same server every time? When people load the app in Europe, they can just be redirected to the european server to start with. I don’t see any reason to switch server URLs while the app client is already running in this case.
I think one redirect when the app starts isn’t a big deal, especially if you can do it server-side without loading the whole app. Many applications do a redirect to a different domain based on various factors.
FlowRouter is implemented on top of webapp, so you can definitely use both. Maybe FlowRouter also has some server-side redirect function, never tried that.