fbpx

What does having a database in the cloud mean?

Skrevet av Nicolai Skogheim

The word «website» does not mean the same thing today as it did ten years ago, and most people have grasped that it has something to do with this “cloud” business. But what does the cloud mean for people who have a website? The big difference is the structure of the systems. In this short article we will take a look at what this means, and what advantages it brings you. You should be able to get something out of this, whether you run traditional systems and are quite knowledgeable, or you are just curious about what a cloud solution broadly means.

Any old website generally consists of at least three elements, whether it’s a blog, a webshop or a social platform. Firstly it consists of code*, which is the actual website. Then it consists of images, sound and video, and finally it consists of the actual content of the website. Code and files are stored on disk, and data (the content) is stored in a database. The database often consists of just one or more files, and is also stored on disk.

*We say code, never codes, for much the same reason that we say water rather than waters. Paintball enthusiasts also say ball rather than balls, but that’s another story entirely.

In a traditional setup, a developer like myself would then have ordered resources from a data centre, and then installed and configured the various components needed. Among other things I would have entered code and media files, and I would have installed and run a database the website could have talked to.

Let us assume we have instead set up two of these in the cloud, and look at some of the benefits that brings. First we’ll look at databases, and then at file storage.

Google Cloud SQL

Databases are sometimes complicated monsters that require a lot of knowledge, time and discipline to get right if you have particular requirements for how well they need to work.  If you have run a database system on a computer you set up yourself, you will know there are a number of things that need to be sorted out, and a lot that can go wrong.

In the cloud, the life of an administrator is much easier, and both customer and administrator benefit. Google Cloud Platform offers a service called Cloud SQL, which for many people is precisely what they need. The big thing here is that this is a so-called “managed service”. This means that it is very easy to set up, and perhaps, even more importantly, that Google ensures that it is available for traffic and that software is updated. Don’t get me wrong, it is possible to wreck things if you try really hard or if you haven’t a clue what you are doing, but in the traditional setup people used to use, a database system could take all night even if you did what you could to keep it live and you knew what you were doing.

Google Cloud Storage Bucket

For storage of media files precisely the same applies. Storing files on the same computer as the website runs on is simple and works very well. Right up until it doesn’t. The computer could have run out of space, the network could be overloaded, someone might have deleted or overwritten files by mistake, or the entire disk might have given up the ghost because it was old or because there was a power cut and it couldn’t cope.

All the problems I have listed disappear if we replace the disk with file storage using a Google storage solution. To protect against files being deleted and overwritten, you do have to make regular back-ups, but all the other problems just disappear. You have to be impressed by that. For me as a developer this means that I can focus on more important things, and for customers it means that they can be confident that media files and other files won’t disappear, and that they will be practically always available to users of the website.

Using dedicated services supplied by the cloud service provider is a constant theme for players who have their platform in the cloud. It is often the case that the more «logic» you leave to the cloud service provider, the more secure and reliable the system becomes.

If you are curious about what other services are available on Google Cloud Platform, you can take a look here

This site uses Google Analytics to collect cookies. Cookies are used to guarantee full site functionality, enable the personalization of content and can be used for the delivery of advertisement or for analysis purposes. To view our full privacy policy, click here.

×