This Lab, logically follows previous steps required to provision and curate a Kubernetes cluster. Please review them before proceeding. If you are in doubt, feel free to contact me directly via https://www.linkedin.com/in/citurria/
In this Lab, we will show how to manage a more complex Microservices-based application based on an E-Commerce Socks-shop App (also see here). Similarly, as with the Simpler Cheeses App, we are going to use Weave Scope to gather real-time insight into this more complex application.
This is an e-commerce application that sells socks on web. However, we chose this application because it is not any different to any modern Application. That is, it is based on multiple microservices, where each one use different technologies as programming languages/frameworks, as well as persistent back stores or databases.
For more information, see: Weave-socks multiple technologies
Straightaway you can think of the hurdle to have to maintain an application like this using the wrong tools. As a glimpse, it is using the following technologies:
- Spring Boot
- Go kit
Among the most difficult aspects that need to be considered in maintaining a microservices-based application like this one, include:
- How to monitor the performance of each of the associated microservices
- How to consistently enforce security policies across all microservices
- How to elastically scale out/in when needed
- How to balance the load, especially after scaling out/in? Do we keep track of the running nodes at all times?
- How to easily maintain networking connectivity across all microservices
- How to self-healing? i.e. Maintain a “desired state”
- Etc. – The list goes on and on…
Microservices certainly introduce great benefits, but also increases coordination efforts, which can become detrimental. Luckily by now you must be very comfortable knowing that containerisation and the whole concept of Container Runtime Interface (CRI) in Kubernetes, together with other technologies (e.g. service mesh) reduce the amount of effort required to maintain complex microservices applications.
First, let’s get a quick view of the different components of this application using Weave Scope.
- Using your Windows Remote Desktop, open a browser window and go to the Weave Scope Dashboard bookmark (if not already opened).
- Filter by Controllers at the top and sock-shop namespace
- Using the techniques shown in the Cheeses App lab, confirm each Application’s underlying technology. This is by clicking at the different Applications, drilling down to their Pods and running Containers, opening the attached consoles, running shell commands on the actual containers, etc.
- Open a new browser tab and click on the WeaveSocks bookmark
- Add a few items into the shopping cart and quickly go back to the Weave Scope dashboard. Notice how it will notice the interaction among the involved components. In this case, Front-end trying to talk to User, Catalogue and Carts.
- Now, login (user/password) and complete the purchase order.
- Quickly go back to Weave Scope Dashboard and notice how the rest of the microservice interacted with each other to complete the Order.
Feel free to try different experiments. Scale out pods, scale in, notice behaviour and comment in your group.
I hope you found this blog useful. If you have any question or comment, feel free to contact me directly at https://www.linkedin.com/in/citurria/
Thanks for your time.
2 thoughts on “Socks-shop Polyglot App in Kubernetes…”