Cloud Computing in Microservices

Overview of Cloud Computing

Cloud computing is a transformative technology that provides a range of services over the internet, allowing businesses to access computing resources without the need for physical infrastructure. The chapter provides an overview of cloud computing by explaining the different models: Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Software as a Service (SaaS), and emerging models like Functions as a Service (FaaS) and Container as a Service (CaaS). Each model offers varying levels of responsibility and control, which are shared between the cloud vendor and the user.

Figure 1.6. The different cloud computing models come down to who’s responsible for what: the cloud vendor or you. Figure 1.6. The different cloud computing models come down to who’s responsible for what: the cloud vendor or you.

Cloud Computing Models

Infrastructure as a Service (IaaS)

IaaS provides virtualized computing resources over the internet. Users have control over the operating systems, storage, and deployed applications, but the cloud provider manages the infrastructure. This model is akin to buying a pre-made meal, where you have the ingredients but need to do the cooking yourself.

Platform as a Service (PaaS)

PaaS offers a platform allowing customers to develop, run, and manage applications without the complexity of building and maintaining the infrastructure. This is similar to getting a meal delivered, where the preparation is done for you, but you still have control over the final presentation.

Software as a Service (SaaS)

SaaS delivers software applications over the internet, on a subscription basis. The cloud provider manages everything, from the infrastructure to the application itself. This is like eating at a restaurant, where everything is taken care of for you.

Emerging Models: FaaS and CaaS

  • Functions as a Service (FaaS): Allows users to execute code in response to events without the complexity of building and maintaining the infrastructure.
  • Container as a Service (CaaS): Provides a container-based virtualization environment, allowing users to manage and deploy applications using container services.

Benefits of Cloud Platforms

Cloud platforms provide the infrastructure to deploy microservices with benefits such as elasticity, scalability, and redundancy. IaaS is particularly noted for its portability and control over services, making it a popular choice for deploying microservices. The advantage of cloud-based microservices centers around the concept of elasticity, allowing for rapid scaling of applications by quickly spinning up new virtual machines and containers.

Deployment of Microservices

For this book, all the microservices and corresponding service infrastructure will be deployed to an IaaS-based cloud provider using Docker containers. This deployment topology is common for microservices, offering significant horizontal scalability.

Cloud Environments and Tools

In the context of this chapter, 'cloud' refers to cloud-based environments where applications are deployed. It involves using services like Spring Cloud Config to manage configuration across distributed systems, enabling dynamic configuration updates and integration with cloud-native tools like Docker and Git.

Running a Cloud Environment Locally

The chapter discusses running a cloud environment on your desktop using Docker and Docker Compose. This involves compiling and packaging source code with Maven, building Docker images, and launching them using Docker Compose, providing a local simulation of a cloud environment.

FAQ (Frequently asked questions)