I am starting a new blog series (with no end date) from today. In this series, I will pick a topic and go in-depth so that I don’t just scratch the surface of the topic. The goal is to build a habit of learning each week and share it with the community. For the next few months, I will write on different aspects of building distributed systems. Each Wednesday, you may expect a new post.
I am sure we all have built applications where one application uses another application to do its job. Most of the time, applications communicate with each other using HTTP REST API but it can be other communication mechanisms like gRPC, Thrift, Message Queues as well. For example, if you are building an application that needs Twitter service for fetching tweets. To call Twitter API, you will need the API URL and access keys to make a successful API call. Most often we rely on static configuration either in the form of a configuration file or environment variable to get the API URL. This approach works fine when you are working with third party APIs like Twitter as their API URLs do not change often. The static configuration approach fails when we build a Microservices architecture based application. The definition of Microservices that I like is by Martin Fowler as described in his blog,
Microservice architecture style is an approach to developing a single application as a suite of small services, each running its own process and communicating with lightweight mechanisms, often an HTTP resource API.
Here are 10 reads I thought were worth sharing this week. The total time to read this newsletter is 148 minutes. This week newsletter has stories on JOMO, How Netflix works, Amazon RDS, Amazon Aurora, Deep work, and few more interesting topics.
Make your peace with the fact that saying ‘no’ often requires trading popularity for respect. — Greg McKeown
Since last couple of years, writing has fascinated me. I became interested in writing as I started spending more time reading books. I have read more books in last couple of years than I have read in my entire life. Good books make you think, question, and become more self-aware.
Stephen King, an American author of horror, supernatural fiction, suspense, science fiction and fantasy once said
If you don’t have time to read, you don’t have time to write. Simple as that.
I think writing is the natural side effect of reading.
Here are 10 reads I thought were worth sharing this week. The total time to read this newsletter is 125 minutes. This week newsletter has stories on Microservice architecture, open office, web scrapping, psudeo-AI, web design, and the rule of 50 to help you know when to give up on a book.
The fool’s life is empty of gratitude and full of fears; its course lies wholly toward the future – Epicurus
Most of us these days are obsessed with our future. In future we want to be our own boss, we want to run our own company, travel the world, become a millionaire, and so on. We are being sold the dream that life will become meaningful if we become our own boss. What this usually leads to is unsatisfied today. Our blind desires stop us from contributing to our current work in the most complete form. We make compromises in terms of quality and focus in our current jobs. This means we loose out on the training for the better future tomorrow. I think this trend is making us incompetent and we will never be better prepared to make a real difference in future. We should show gratitude and contentment in our existing job. This will give us internal peace and help us prepare for better future tomorrow.
We have Spring Boot 2 application that uses Redis as the cache manager. We deploy our application on Amazon AWS where we use AWS ElastiCache Redis service in cluster mode disabled. Our setup includes a Redis master with two Redis slaves. The default Java client for Redis with spring-boot-starter-data-redis dependency is lettuce-core. When you are working with single Redis node with no slaves, using AWS Elastic Cache Redis is as simple as providing the spring.redis.url with the value of AWS ElastiCache Redis instance URL. This was the set up that we were using till a month back. As the load on the system increased we decided to use ElastiCache Redis in replicated setup to scale our reads. In AWS, Redis implements replication in two ways:
With a single shard that contains all of the cluster’s data in each node – Redis (cluster mode disabled)
With data partitioned across up to 15 shards — Redis (cluster mode enabled)
In our case, cached data is less than 1 GB so it fits in RAM of single node. This made us choose cluster mode disabled setup.
Here are 10 reads I thought were worth sharing this week. The total time to read this newsletter is 121 minutes.
It is not that we have so little time but that we lose so much. The life we receive is not short but we make it so; we are not ill provided but use what we have wastefully. – Seneca, On the Shortness of life