Reputation: 77
What are the advantages and disadvantages between buying a physical server and using it to store a database, compared to buying a remote database server online to store that information?
I am asking this in the context of somebody who is trying to build a desktop application. How does this compare in terms of price, ease of use, speed, etc.
Upvotes: 1
Views: 5133
Reputation: 562310
In general, you don't pick a cloud platform because it's cheaper. It usually ends up being nearly the same cost as hosting your own server. But it does mean you trade capital costs for operational costs. You don't have to amortize the capital asset, etc.
You also don't have to deal with hardware-related troubleshooting and maintenance. You don't have to worry about whether your rack has enough electric power to run your server. You don't deal with firmware upgrades and hard drive replacement and junk like that. That frees you up to pay attention to your business and your application, instead of being distracted by the infrastructure.
Cloud platforms also make it orders of magnitude faster to provision new servers. When your database grows and needs more space or more server horsepower, you can fix that as fast as you can click in the cloud platform GUI. No longer does it take weeks to upgrade a server, and involve on-site technicians.
Ease of use depends too much on what you need to do, and which cloud provider you choose. Also the features supported by cloud providers change so fast, any answer would have a short life. So I can't answer that for you.
Performance is a consideration. The speed of the cloud database server with respect to query execution time is about the same as a self-hosted server, but the latency is what you need to pay attention to.
Latency of long-distance network requests can be 100ms or more, depending on how far the cloud data center is from your client. Lots of applications depend on being able to do rapid database queries.
For example, suppose one app request needs to run 12 database queries. Each query will therefore add up to 100ms to the processing time of the request. This is unsustainable if your requests need to do all their work in under 1 second. 1 second is probably way too long anyway.
For this reason, it's often necessary for the app to run within the same local network as the database, so they can communicate between each other many times per second with minimal latency.
Finally, you should consider security. Long-distance network connections are easy to eavesdrop on, so you need the app to communicate with the database via TLS or VPN. Make sure your cloud provider supports the secure communication you need, and make sure your app uses only secure connections.
Upvotes: 3
Reputation: 46
Hosting in the cloud has huge advantages:
Latency is a non-issue, and the HW available in the cloud can outperform an affordable physical server. Using containers like Docker, you can spawn as many service / application instances as you need for High availability and horizontal scaling.
Large corporations are moving to the cloud to reduce internal IT costs and adapt faster to the rapidly evolving software ecosystem. The cloud is on-top of this, providing the bleeding edge capabilities as fast as they arise.
Using a physical server does eliminate the dependency on internet access - in case that is spotty and your application otherwise has no external dependencies - you could keep your app online while the net is down.
Hope this helps. -kevtsi
Upvotes: 3