Most folks in the industry are very comfortable with SOAP and REST protocols, but there's a lot of buzz around using gRPC in the past few years. We will look at how we what gRPC is, and how it can be leveraged to build services. Finally, we will look to see where Kubernetes fits in from an application deployment perspective.
- [Instructor] Your first question when building cloud native applications might be, how are these modules in my application going to communicate with each other? This comes up quite a bit when getting started with microservice architectures. If you've been working with REST or SOAP for your web service layer, and want to try something new, you might want to consider Google Remote Procedure Calls, or gRPC. Like REST and SOAP, gRPC is a request response-based system. The payload that's passed between the client and the server uses something called a protocol buffer, or protobuf, which is basically a way to serialize structured data.
gRPC has many features that people like. Some of these include robustness, where the client and server have to respect the protobuf contracts. As a result, the guesswork of whether or not a client library will work with a new version or release is removed. It's also fast. gRPC runs on HTP 2 by default, which reduces latency and leads to faster performance. You can also easily create clients. From a server side perspective, there's no need to maintain client libraries.
Clients, by default, can create their own libraries to talk to the server. And finally, gRPC offers up a layered design approach to enable extensions. Authentication, load balancing, logging, and monitoring become much easier in the gRPC model. I've been using gRPC in my web services since 2015. I like it a lot more than REST, because as a team, we don't have to waste time brainstorming on whether a request should be a PUT or a POST, or whether a REST URL is REST-y enough.
So far, it's worked out great for the projects we run in Kubernetes that need to pass information efficiently. Take a look at the gRPC website and the course handout for more information on gRPC. The next big question is how would I deploy this thing? Once you have your app running, and especially if you built this with containers, it makes total sense to manage and deploy containers using Kubernetes as the container orchestrator. Kubernetes was the first project that was part of the CNCF so it's going to be the base building block into which other projects will integrate.
If there's one project you should pay attention to in this entire ecosystem, it's Kubernetes. I could go on and on about why Kubernetes is the solution for the future to manage and deploy applications and perhaps even your IT infrastructure. In fact, I recommend that you check out the Learning Kubernetes course in the library while I walk through this whole process. We've catched on gRPC and Kubernetes and how these two are critical pieces for application communication and deployment. So basically, consider gRPC when you're building your communication layer for your applications and Kubernetes as your deployment platform for your apps.