Zerodha created 7 million PostgreSQL tables to scale its reporting architecture. Yes, you heard it right. It’s  7 million tables  and not  7 million

Engineering At Scale

submited by
Style Pass
2025-01-09 18:30:03

Zerodha created 7 million PostgreSQL tables to scale its reporting architecture. Yes, you heard it right. It’s 7 million tables and not 7 million table records.

Zerodha is India’s largest stockbroker. It’s the first discount broker and has a vision to make trading/investing for retail investors.

Zerodha users purchase different securities such as stocks, ETFs, Mutual Funds, Futures, Options, etc. The platform must generate reports for different user queries like :-

Zerodha offers its users a platform known as Console to view the different reports. Let’s now understand how the platform was built originally.

Zerodha used a variety of databases such as PostgreSQL, MySQL, and ClickHouse to manage the user data. In the old architecture, the backend web server executed queries on the database and returned the results to the clients.

The above architecture couldn’t scale with the growth in user and transaction volume. Here’s why the platform couldn’t scale :-

Leave a Comment