Meet "The Cloud"
"The Cloud." Everybody's heard of it by now, and everybody's telling you that "you've got to get there." But, what is it? Actually, it could be several things. Let us explain ...
"The Cloud" == "Time Sharing"
"Time sharing" is an idea that's as old as the big mainframe computers that used to (and in fact, still do ...) fill big, air-conditioned rooms. Before personal computers existed (and were powerful enough to get out of their own way), you accessed "computers" using a terminal and a telephone modem. You were sharing the resources of that big mainframe computer with everybody else, which was dividing its time between all of you.
Classic "hosting services" still provide this, although today you are probably sharing a Linux® or Microsoft Windows® machine. These services allow you to "log in" to a terminal session, and they also host things like web sites. But "the Cloud," in actual parlance, is much more. Yes, you are "time sharing" the resources of some remote service provider, but the ways in which you are doing it are actually much more sophisticated than this.
Cloud Option #1: "Application Servers"
The main player in this space is [Sales]Force.com.® Originally they were just a supplier of Customer Relationship Management (CRM) software, but the software and hardware platform which they built to provide it has since taken on a life of its own. Many sites (and back-end systems) which have nothing at all to do with CRM are built on the Force.com platform.
The defining characteristic of this approach is that the cloud computer(s) are running an application: "[Sales]Force itself." This is not a "general purpose" solution – the computer is actually running only one thing. The particular site that you visit is, in effect, a customization of what that very expansive and sophisticated application provides. But everything in the entire hardware and software installation is specifically built to supply what it needs, very efficiently and to a very large number of users. If your requirements dovetail with what Force.com provides, this can be an extremely efficient solution.
Another form of "application server" is used, for example, by the pythonanywhere.com hosting service which actually runs this web site (using Amazon® Cloud Services). As the name implies, this service only supports web sites which are written in the Python programming language. Sites become active when they are accessed, and during their lifetime may be served by one or by many computers. The service "serves a very specialized purpose, but does it extremely well."
Cloud Option #2: "Virtual Machines"
Virtual Machines are a concept that was also introduced by mainframes: IBM's VM® operating system family, which still exists today. Here, the resources of the host computer are deployed in such a way as to create one or more virtual computers. To the user of that virtual computer, there appears to be a certain amount of memory, a certain number of CPUs and CPU cores, various attached network adapters, video cards and other hardware, and devices such as disk drives. But if you walked into the room and looked at the physical host computer that's actually creating these virtual environments, you'd see that it looks nothing like this. The virtual machine is, in fact, a perfect illusion.
Just like real hardware, virtual machines ("guests") run a "guest operating system" – Windows®, Linux®, etc. – and this operating system might be the same as the one being run by the host, or different. In any case, it is distinct. The virtual machine host creates the environment in which the virtual machine, and its chosen operating system, can run.
Virtual machines are powerful and flexible, thanks to the hardware features that are now included in modern operating systems, but they are also expensive and not very scalable. You have to perform all of the software maintenance steps that would be necessary on a real machine, separately, on each virtual one.
Cloud Option #3: "Containers"
"Containers" are a much more refined software illusion. Here, the applications are, in fact, "running directly in the host's operating system environment." But, they don't know it. Instead, they appear to be running in a software environment of their own. Within their container, they might believe that they are running as an all-powerful ("root") user. Depending on the type of container, they might perceive that other applications are running alongside them, or that they have the container entirely to themselves. What they don't know is that they are, in fact, "wearing rose-colored glasses."
Containers provide the essential isolation of a virtual machine, but with much less cost. There is no "guest operating system." Containers can be instantiated or destroyed almost instantly. And, commonly, they are being run by a cluster of physical machines. (The containers cannot perceive other containers, and do not know which machine in the cluster is running them. Nor do they care.)
Container-based solutions are very efficient and also very scalable. As load conditions change, the host can respond dynamically and in real time, deploying additional container instances and moving them around, all done in such a way that the containers need not be aware. Companies such as RackSpace.com® specialize in this sort of thing, and there are many others.
The Death of "The Computer in the Broom Closet"
Cloud-based deployments put a permanent end to "the computer in the broom closet." (Or, in the now-famous case of a certain American political candidate, "in the bathroom.") The computing hardware that is available "in the cloud" is very considerably more advanced than anything you could likely afford to buy, and it's deployed in secure data centers on the main trunk lines of the Internet ... by somebody else. Each provider offers a similar set of management tools which make deployment very easy. These are reliable, mature technologies that provide very predictable high performance.
The very same technologies that are available on the Cloud can also be run on your own local development machines. For instance, Oracle® Corporation offers VirtualBox®, a virtual-machine monitor which runs on Microsoft Windows, Linux, and Apple's OS/X® (MacOS®) and which is absolutely free of charge. "Container" capability (based on "Docker®") is now built-in to some versions of Microsoft Windows, and can easily be installed and run on any other operating system. (Even IBM's mainframes are now in on the game!) All of these technologies, including their associated management tools, are "open source."
What's Best for You?
Because of the large number of options that are now available to you at very reasonable cost, "cloud-ifying" your application can be done in a number of different ways depending on your actual and anticipated requirements. Virtual Machine deployments are usually very straightforward and, partly due to the sheer amount of horsepower that's available ("throw silicon at it!"), will run very well. Container-based technologies offer other tantalizing possibilities including the option of re-structuring the application to run across multiple containers (each doing different things) at the same time.
So, "what's best for you" is something that can only be adequately determined by careful examination of your application's present state. From this assessment it is then possible to recommend several different alternatives.