Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hosted Databases: How is latency handled?

I read some things about hosted (aka cloud) databases. For example Cloudant offers a hosted CouchDB database or Cassandra.io offers hosted Cassandra. I understand why these services solve some problems.

My question: Why do these services work? I suppose I host my own application on my own servers (or somewhere on a cloud-hosting-platform) and use one of these services to store my data. For every database request (either read or write), I need to pay a full roundtrip over the internet (supposing my application is not hosted in the same place as my database cloud provider uses). Why aren't these roundtrips killing me? When thinking about SQL, every query would cost another x*10ms just for the network, without any time spend.

How is this problem solved? Or are these services not suitable for applications which need fast responses and can only be used for data processing where latency is not an issue?

like image 376
theomega Avatar asked Nov 13 '22 00:11

theomega


1 Answers

generally, the physical hosts of hosted database services normally reside in major data-centers (e.g. AWS). In order to reduce network latency, customers can choose whether to host their application on servers that reside in the physical same data-center as their hosted databases reside.

The majority of high-performance applications and/or website that do not use hosted database services usually maintain their application servers and their database servers on separate hosts for performance reason anyways. So, in short, switching to hosted database service would not necessarily increase network latency.

like image 74
Lea Krause Avatar answered Dec 25 '22 14:12

Lea Krause