Generate viral LinkedIn posts in your style for free.

Generate LinkedIn posts
Gaurav Sen

Gaurav Sen

These are the best posts from Gaurav Sen.

4 viral posts with 8,304 likes, 195 comments, and 56 shares.
1 image posts, 0 carousel posts, 1 video posts, 2 text posts.

👉 Go deeper on Gaurav Sen's LinkedIn with the ContentIn Chrome extension 👈

Best Posts by Gaurav Sen on LinkedIn

While going through our AWS bills, I noticed a trend. Our database costs were going up linearly.

I looked at it positively. Our user base is increasing, leading to more activity. And more activity means more costs, right?

So I asked our DB to list its most popular queries. Here's what I saw on top:

UPDATE user_activities SET last_seen = CURRENT_TIMESTAMP WHERE user_id = ?

This query runs every time a client sends a request. For our system, that's a million queries per month.

That explains the bills 😛

--- What did we do?

The first thing we did was comment out the query line. To save money, you know.

Then we started brainstorming. One of the ideas was using AWS kinesis to store events, and Athena to process them later. But we did something much simpler.

We persisted the data as a log line in the server's local file system. Periodically, we aggregate these logs, sample them, and persist them in the database.

With a sampling factor of 1:50, we reduced our costs significantly. With aggregation and batched writes, we reduced costs even further.

As a startup, a 200$ cost reduction per month is worth fighting for!

--- Generalised solution

The idea is simple:

1. Persist data in a durable store (quickly).
2. Replicate this data into a different store, optimized for reads.
3. Clients can now read this data (eventually).

We call it Deferred Visibility. It is a deliberate delay in processing updates, trading off high consistency for low latency and fast persistence.

This technique is also part of popular solutions like WAL, CQRS, and CDC. We got inspired by WAL in particular!

To learn more about design patterns, try the System Design Course at InterviewReady.

Cheers!

#SystemDesign #DesignPatterns #CostOptimisations
Post image by Gaurav Sen
One of the best products I've used is Razorpay. Everything from onboarding my business to accepting payments has been a great experience.

What's the icing on the cake? RazorPay solves a problem that I didn't expect it to.

It makes affiliate payouts, salary payments, and TAX payments simple. Yes, that's “TAX payments“ and “simple“ put in the same statement.

Thank you, Harshil Mathur and team for making such an awesome product. It would be my honor to host a RazorPay engineer on my YouTube channel.

What you have done has helped thousands of entrepreneurs.
You guys are amazing.
This is my first video on entrepreneurship.

These factors helped me switch from a developer role to InterviewReady.

1. Sustainability
2. Safety
3. Data

You can let me know your thoughts in the comments.

#Entrepreneurship #StartUp #InterviewReady
I read a paper by Google.
And I was impressed 🤩

Then I read a paper by Meta.
And I was dazzled 😵

Then I read a paper by IBM.
And I was overwhelmed 😱

Then I saw our user traffic.
To finally decide that...

...
...

We should continue with a monolith. 😛

#systemdesign

Related Influencers