-2

I could not find a tutorial for beginners for how to locate my servers.

For instance I use Compose.io for my MongoDB and DigitalOcean for my Meteor.js app.

Lets say I want to have fast service in Germany. Now the closest I can get to Germany with Compose is London. Should I now place my DigitalOcean backend server close to my DB server in London? Or better place my backend in Germany (DO offers Frankfurt as a location)?

Obiwahn
  • 99
  • 1

1 Answers1

2

Physical location does not necessarily correlate with "logical" network location, so you'll need to do more testing and research.

You want your application to be as "close" (in terms of network latency and throughput) to your database as possible, preferably in the same datacenter.

Unfortunately there's no template for how to figure this out other than to rent (temporarily) servers in each of your proposed locations and then test communications with the database server. If the vendors are kind, perhaps they'll be willing to do this testing for you, or at the very least, ping your database instance and provide the results.

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • OK. So in most cases it is better for the app to be close to the db than to be close to the user? – Obiwahn Apr 14 '16 at 15:55
  • 2
    @obiwahn for large projects, you'll typically use multiple locations by splitting the app into layers. You often want the back-end app close to the database so data are rapidly accessible for analysis, while the large, bulky, static assets which are common to all requests (e.g. images, JavaScript, CSS) can be situated close to users via a [CDN](https://en.wikipedia.org/wiki/Content_delivery_network). Your app sends dynamic data to customise a user's request, while common assets are loaded from a network point logically closer to the user. But it all depends on the app's semantics. – Cosmic Ossifrage Apr 14 '16 at 16:03