Is Your Infrastructure Ready for a Decoupled Deployment?
As Brendan Burns once explained eloquently, Kubernetes was built on the premise of decoupling a whole slew of microservices from being highly connected, interdependent problems so that one minor change does not result in a ripple effect and bring the entire application down.
As Kubernetes adoption picks up, I set out to know if my friends on Twitterville shared the same concerns that we (our customers) have. I put out a Twitter poll on problems/concerns encountered with Kubernetes deployments. Deployment Automation followed by Load Balancing were the top answers.
The industry is moving from a monolithic app architecture to a microservices architecture to deliver continuous innovation with hundreds of microservices apps. While k8s can help with automating deployment, scaling, and management of containerized applications, it was interesting (and validating) to see the results of my recent poll.
When delivering continuous updates to hundreds of microservices, there are several aspects to keep in mind to ensure that one change does not break the application.
Once you have multiple instances of a microservice application, the primary question to answer is “How do I connect to a particular microservice?” or “How does another service consume the service provided by a particular microservice?” Whether the target instance resides within the pod or in a different pod, the service must be able to successfully locate it and send requests as required to ensure a seamless user experience.
The next major challenge to address is load balancing application traffic for these microservices. Any load balancing solution can help you handle north-south traffic; you just need to ensure you work with your networking team to set up routing rules to follow traffic from public IP instances to the load balancers and ensure that these routes always point to the right load balancer. If the load balancer fails-over in a high-availability setup, you may need to manually update, or write a script to update routing rules to change the next hop from one host to the other. However, these microservices generate a large volume of east-west traffic across pods in a Kubernetes cluster. You will need a solution that can handle traffic intelligently across the pods.
Multi-Cloud Traffic Management
A subsequent challenge to load balancing is the ability to deploy applications in a multi-cloud environment. For example, we should be able to deploy apps in OpenShift clusters running on different data center sites or public cloud regions. The handoff across these sites should be seamless and be able to automatically scale-up both application and load balancing resources. Traffic management strategies have to support infrastructure heterogeneity and abstract complexity from IT operations while offering a consistent experience no matter where the apps get deployed.
Application Analytics for Autoscaling
Once you have setup all the application services and deployed your Kubernetes clusters, the next step is to monitor application traffic and performance. Some of the metrics you need to measure are the number of connections, transactions per second, user types, user behavior, among others. The more granular the insights you get, the more efficient your Kubernetes deployment. Containers, microservices, and CI/CD initiatives gained popularity because they automate service delivery. Hence, scaling microservices applications should also be automatic and should not require manual intervention. You need insights into traffic patterns to define autoscaling triggers for microservice instances or load balancers to plan for peak usage.
These analytics also help you understand the specific source of failure or a particular microservice that triggered the ripple effect. This will also help your troubleshooting be a lot less like the “searching for a needle in pods (haystacks)” nightmare!
Rolling out your microservices deployment should not become an ordeal. Kubernetes delivers all the tools you will need to automate your deployment. We look forward to seeing you at KubeCon 2016 to chat more about your experiences and concerns.