Host a database server with a different hosting company

1

I am hosting my app and database in Linode. I want to scale it by having a separate database server, but I reckon I don't need to pay $10/month for another VPS with Linode for the database server. I could just pay $5/month for Digital Ocean and use it as a database server.

Question: is it an ok practice to host the database on a different web host/network? Should I have my app server and database server under one same web host instead?

What about situations where I host the DB in Google Cloud SQL or Amazon RDS?

Victor

Posted 2014-11-26T07:13:31.930

Reputation: 113

Question was closed 2014-11-26T08:01:40.997

This would be more something for [dba.Se] or perhaps even Server Fault, depending on your use case. – slhck – 2014-11-26T08:02:23.697

Answers

1

Yes, having your database located on another server across the network is totally fine. It would actually be beneficial for you to have a database server with the same provider, and you should ask if you can have a VPS provisioned on the same hardware node. This will make network requests very, very quick versus using another provider, and therefore very likely making requests to another datacenter somewhere.

You need to consider latency as probably the biggest worry about externalizing a database server. Of course it should be secured properly against attacks like any other net-facing software. Otherwise this is a scenario very common in many production systems out in the wild.

L0j1k

Posted 2014-11-26T07:13:31.930

Reputation: 135

Thanks. What about situations where I host the DB in Google Cloud SQL or Amazon RDS? – Victor – 2014-11-26T07:44:13.410

It's the same considerations. You should do some benchmarking to see what kind of latency is introduced by an external database server, and you will need to ensure the security of the connection. Amazon offers its free tier which includes quite a lot of stuff for free for one year, including a micro RDS instance. You might take a look and see if this works for you.

– L0j1k – 2014-11-26T08:19:18.357