SRE this week— 16 Oct 2022
I compile the best of the best things that I come across and share them in my LinkedIn posts.
This week we covered:
- Httpie — A better alternative to curl
- Ambassador Design Pattern
- Monitoring for everyone — Prometheus
- Let’s learn pytest
I write about the tools and tips related to Software Development and SRE regularly on my Linkedin profile. You can check out my profile here: https://www.linkedin.com/in/vikasyadav94/
Httpie — A better alternative to curl
Do you expect more from curl at times? Wish it were easier to make API requests right from your terminal.
Well, httpie can help. It’s a great alternative to curl for interacting with web APIs right from your terminal: https://lnkd.in/e6dgEnuB
Bonus: check out the example in the image — An API to help you do currency conversions right from your terminal. More details are in the comments.
#devops #apis #apitesting #httpie
Ambassador Design Pattern
Do you know about the “Ambassador” Design Pattern in the cloud world?
In terms of #Kubernetes — this pattern works something like a Sidecar — It deploys an extra container (let’s call ambassador container) alongside the main application container in the pod. This ambassador container then acts as a proxy for all network requests going out of the application container.
The benefit we get out of this pattern are
👉 We can abstract out the complexity of things like circuit breaking, security ( such as TLS), and network calls logging out of the application.
👉 Your application code doesn’t have to bother about these complexities.
👉 It’s language agnostic. It doesn’t matter which language/framework you have used to build your application — the ambassador container will work all the same.
To learn more about this pattern — I highly recommend reading this beautiful article by #Microsoft -> https://lnkd.in/eigMJsRF
#softwaredevelopment #sre #designpatterns #kubernetes
Monitoring for everyone — Prometheus
This is the best monitoring tool that I’ve come across in a very very long time!
The beauty of it is how easy it is to work with and how seamlessly it integrates with the whole cloud native ecosystem. It makes large-scale monitoring trivial. Because of the Prometheus stack — a wonderful monitoring framework is now available to the masses.
Here’s a quick read which will help you understand it more. I highly recommend going through the article: https://lnkd.in/eyMP65gD
If you haven’t used it already — try setting up on your Kubernetes cluster using this helm chart: https://lnkd.in/eSXpCkvv
#sre #devops #monitoring #prometheus
Let’s learn Pytest
Want to get better at writing tests in python? Read this!
Writing tests is an integral part of the development process. It makes life easier for — developers, customers, leaders — everyone. I’m glad that early in my learning phase I stumbled across this gem which taught me how to use pytest better.
If you want to save hours and hours of your time — give this a try (You won’t ever need another pytest tutorial ever after this).
This repo
-> Walks you through pytest step by step and covers all the important aspects.
-> teaches you how pytest works as a framework.
-> Clears all your doubts related to fixtures and how they work
-> Covers parametrization, marking tests, mocking