From the course: Building High-Throughput Data Microservices
What are cloud-native data services?
From the course: Building High-Throughput Data Microservices
What are cloud-native data services?
- [Instructor] I hope you now have a better understanding of microservices. In this video, I'll provide a foundation for you to understand cloud-native data services. The cloud is a infrastructure that supports on-demand provisioning of computer resources. The cloud allows you to easily manage and dynamically scale your applications. Moving applications to the cloud is a major driver for converting monolithic applications into microservices. There are public clouds such as Microsoft Azure, Amazon Web Service, and Google Cloud. There are also private clouds that run within the company's data centers. The cloud often uses platforms such as Kubernetes that simplifies running microservice applications. If you're not familiar with Kubernetes, check out the course, "Kubernetes: Your First Project". A microservice application needs basic principles to run in the cloud. These principles are often referred to as twelve-factor. A cloud-based company called Heroku invented the twelve-factor principles in 2012. And these principles have been widely adopted as best practices throughout the industry. A twelve-factor app is also referred to as a cloud-native app because of their proven ability to run seamlessly on any public cloud. I've never had any issues running applications seamlessly on the cloud as long as I stick to the twelve-factor principles. Factor six of the twelve-factor principles states that applications should be stateless. That means that applications should not rely on saving data on its local file system. The management of state information should be delegated to a backend service. Factor four states that you should treat backend services as attached resources for a cloud-native application. A database such as Postgres or a messaging system such as RabbitMQ are examples of backend services. So I will refer to a backend service that manages the stateful data for an attached microservice as a data service. Users' contact and product information can be stored in a database like Postgres. A payment transaction can be published and consumed from a messaging system like RabbitMQ. If you're not familiar with Rabbit or Postgres, don't worry. We'll talk more about these technologies later in the course. You may be wondering, is it acceptable for a microservice to share data services like a shared database or a shared messaging system? Well, imagine if there's a issue with a data service. A negative impact of sharing is that any problem with the data service like a database would affect more than one microservice. And remember, a key feature of microservices is its ability to be developed, tested, and deployed independently. So cloud-native microservices should not share any data services with other microservices. In this case, a database issue only affects a single microservice. A benefit of not sharing data services is that you can scale them to meet the unique and specific needs of a particular microservice. Let's dive into one particular need of microservices, which is throughput.