mousadafousa
mousadafousa

Reputation: 77

Cloud database server vs physical database

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

Answers (2)

Bill Karwin
Bill Karwin

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

kevtsi
kevtsi

Reputation: 46

Hosting in the cloud has huge advantages:

  1. If you host your own physical server, you or your company have to patch it and maintain the physical server AND the associated network infrastructure yourself - this overhead is significant. Nearly all of this can be delegated to the cloud.
  2. Physical servers have a limited life-cycle - hard drives, etc don't last forever, but in the cloud your application is portable and remains alive as long as you pay for the cloud service.
  3. Using big cloud services like AWS/Azure, the cloud is available all over the world, and you won't be able to compete with it's availability.
  4. In the cloud, you buy what you need - as your application scales, so does your cloud footprint. Compare this to adding physical servers, the lead time for the hardware and bring-up, the cloud wins hands down.
  5. The cloud has vast services that make developing your application quick, things like message queues, different database engines, auth services can be implemented on your local server, but this takes time and has it's own license cost implications.

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

Related Questions