Database Tuning at Zerodha - India's Largest Stock Broker

  Рет қаралды 105,300

Perfology

Perfology

Күн бұрын

Speaker : Satyajit Sarangi @ Zerodha
Step into the world of Zerodha, India's largest stock broker, and uncover the secrets behind their database tuning and optimization techniques. In this exclusive video, we'll take you through:
Advanced Database Optimization Techniques: Learn how Zerodha keeps their databases running at peak performance.
Performance Tuning Insights: Discover real-world strategies and best practices from the experts at Zerodha.
Scalability Solutions: See how Zerodha handles massive data loads and ensures reliability for millions of users.
Whether you're a tech enthusiast, database professional, or just curious about the technology driving the stock market, this video is packed with valuable insights and practical tips to help you optimize your own databases.
Video Credit : ‪@pgconfin‬
🔔 Subscribe to our channel for more tech tips and tutorials:
👍 Like us on Facebook : / perfology
👍 Add us on Instagram: / perfologys
👍 Follow us on Linkedin: / perfology
#DatabaseTuning #Zerodha #StockBroker #DatabaseOptimization #TechTutorial #PerformanceTuning #SQL #DatabaseManagement #techinnovation
Chapters
00:00 Introduction
02:59 History Of Postgres usage
07:54 Managing Big Data
14:40 Understanding your query planner
20:38 Replica Master Slave
29:10 Postgres DB Rights
31:18 Postgres Learnings
39:16 Problems with Postgres

Пікірлер: 101
@mzs114
@mzs114 19 күн бұрын
Boring tech is usually better in most cases.
@pankajsharma-cb4ok
@pankajsharma-cb4ok 18 күн бұрын
By listening to it, I got to know that I also faced similar issues and worked on similar set of solutions except materialised views and redis. Happy to see myself on same path...
@haloboy777
@haloboy777 19 күн бұрын
Sensible defaults go a long way, but they only work in certain scenarios. I commend their choice of sticking to the basics. To be honest, their main engineering efforts are focused on rewriting their codebase, and I believe that is their core competency. I wish more companies allowed frequent rewrites [where needed].
@gokukakarot6323
@gokukakarot6323 19 күн бұрын
The rewrites are not unwarranted, they hit scaling requirements and then improve. Their PDF sending blog is a great example. Some engineers would probably start at that, but that's not how things work in real life. Most startups face this problem as well. Starts with java or rails and then splits into microservicrs to scale independently
@manishmundra7303
@manishmundra7303 20 күн бұрын
No doubt this is a gem talk.. Though I feel slides could be done much better with the kind of content talk had.. Still learned a lot & cheers to this great talk!!
@CoppsMusic
@CoppsMusic 11 күн бұрын
Zerodha sits on top of SEBI's tech APIs. God, One has to listen from SEBI on how their orchestration is.
@HardikGajjarTechy
@HardikGajjarTechy 19 күн бұрын
PG always shock engineers with new features and flexibility
@codingwithsam4992
@codingwithsam4992 17 күн бұрын
These are the guys and their content which people should be consuming and not those of LinkedIn didis
@arpanmukherjee4625
@arpanmukherjee4625 18 күн бұрын
I love this guy seriously. Very powerful insights.
@TheBrahmadath
@TheBrahmadath 15 күн бұрын
So finally found the responsible guy for the recent backend glitch..
@nabhamgupta3626
@nabhamgupta3626 14 күн бұрын
Super interesting :) more such insights tech talks🙌
@TesthelloUser2
@TesthelloUser2 19 күн бұрын
Thank you for the video....
@animalempire5513
@animalempire5513 19 күн бұрын
That's good to know😊
@minimilitiapro6528
@minimilitiapro6528 15 күн бұрын
Great talk , got to learn a lot from this video 😍
@samannwaysil4412
@samannwaysil4412 20 күн бұрын
so informative
@velloer
@velloer 18 күн бұрын
Awesome
@anantmishra6783
@anantmishra6783 20 күн бұрын
hahaha ..good one! Very valid points were made!! x)
@ChristieDsouza
@ChristieDsouza 15 күн бұрын
this is gold !☺
@BhagyashreeJha-h1v
@BhagyashreeJha-h1v 15 күн бұрын
Boring is good for you. Thanks for sharing the knowledge.
@mrpam4672
@mrpam4672 16 күн бұрын
Great!
@NIKHILVERMA-xr7lc
@NIKHILVERMA-xr7lc 16 күн бұрын
Good lecture ⭐
@VIKASJAIN-no5wt
@VIKASJAIN-no5wt 17 күн бұрын
Hope Kamath brothers are paying you well..
@WaseemAshraf
@WaseemAshraf 18 күн бұрын
I don't agree with offloading all of the computations to the database. Yes some computations are good on the database side, but if you are doing some heavy computation that should be on the app side. The benefit of that is you can have multiple backend machines and single database. Using loadbalancer and multiple workers is very easy for backend as compared to having multiple databases.
@srikanth1281
@srikanth1281 18 күн бұрын
Agree, suffered a lot with my analytics platform (mongo) only because we offloaded queries to db. This is even after good amount of denormalisation, huge data means aggregation are consume all the resources.
@Dipesh_Sol
@Dipesh_Sol 13 күн бұрын
At 37:27, not just the speed of computation, but also the egress cost of transferring all that unnecessary data over the wire to your server from database to perform reduce type computations which can simply be done on the database layer itself. And if you find yourself querying such data frequently, then you can have materialised views for it, making it even faster. Finally, if your use case doesn't require the most latest data and is fine with eventual consistency, then you can add a caching layer in front of it, making it blazing fast.
@nikhilkartha9373
@nikhilkartha9373 6 күн бұрын
Understanding this is as exciting as watching paint dry.
@parasharp28
@parasharp28 16 күн бұрын
It all felt like an interesting discussion, but I couldn't understand (won't say I couldn't digest) a few things he mentioned such as - copying terabytes of data and restarting the server under 1 min, letting the database do most of the calculative work, no replica sets (how about contingency planning) and in a way portraying Postgres as an 'all weather database'......seems like a wake up call for myself.....
@an_other_world
@an_other_world 16 күн бұрын
frequent code rewrites === frequent down times (if the code changes do not have sufficient coverage and are not properly tested by QA)
@abhishekbhardwaj563
@abhishekbhardwaj563 18 күн бұрын
I have always found simple dumb solutions to be the best solution that lasts long without any crash.
@kparag01
@kparag01 12 күн бұрын
He wants to keep talking light but the audience is damn serious
@itshgirish
@itshgirish 18 күн бұрын
am i missing something here? Able to bring up db 15-20 TB of fresh copy from S3 in < 2 mins!
@abhirajsingh8138
@abhirajsingh8138 16 күн бұрын
yes he said that
@teluguinfofacts4600
@teluguinfofacts4600 16 күн бұрын
Is it true
@abhirajsingh8138
@abhirajsingh8138 16 күн бұрын
@@teluguinfofacts4600 no idea
@Anonymous-im2dy
@Anonymous-im2dy 19 күн бұрын
1:42 why there is small laugh on mongodb 😂
@VarunKeshav
@VarunKeshav 17 күн бұрын
Yeah WTF
@VarunKeshav
@VarunKeshav 17 күн бұрын
That one slide of how do we manage big data pretty much throws light on points where MongoDB shines. Maybe they had a poor experience and wrote it off.
@shantanukulkarni8883
@shantanukulkarni8883 16 күн бұрын
I guess nosql ism't really suited for a very structured thing like a stock broker database. Others he mentioned like Mysql, Cockroachdb are SQL. It's kind of just like an experimental thing. But maybe he just remembered something funny about it.
@ganeshbabu8263
@ganeshbabu8263 20 күн бұрын
I feel dumb
@nikunjmmistry
@nikunjmmistry 16 сағат бұрын
This is good, are these conferences invite only?
@sarbajitnandy9291
@sarbajitnandy9291 15 күн бұрын
Where does this kind of tech conferences happens?
@YugalkishorJha-z2x
@YugalkishorJha-z2x 5 күн бұрын
Wow
@ans_human
@ans_human 14 күн бұрын
Can you share the RCAs on recent failures on the kite platform
@phoneix24886
@phoneix24886 7 күн бұрын
A little bit over provisioning when serving 2 million requests with an sla is better than being conservative.
@J0Y22
@J0Y22 20 күн бұрын
damnn
@Grizzler231
@Grizzler231 5 күн бұрын
Bruh he laughed when he said mongo
@user-hl6hv3qu9c
@user-hl6hv3qu9c 4 күн бұрын
Do they implement CQRS ?? not clear ; what kind of postgres scaling ?; Any SOR layer - System of record; what ORM ??; some high level banter about postgres DB tuning with no specifics; Query optimization no specicifs
@godisgreat1000
@godisgreat1000 16 күн бұрын
why most of the crucial times zerodha app stock responding?
@premsaivittal2030
@premsaivittal2030 17 күн бұрын
What's his name ?
@codingwithsam4992
@codingwithsam4992 17 күн бұрын
I want to connect with you? What is your name?
@viputdBeast
@viputdBeast 7 күн бұрын
Atleast mention the speaker name in video title or in the description
@yashvarshney8651
@yashvarshney8651 20 күн бұрын
gold
@go1d
@go1d 20 күн бұрын
ha bhai?
@RahulRaj-jc7os
@RahulRaj-jc7os 20 күн бұрын
@@go1d
@cringelord511
@cringelord511 18 күн бұрын
is it okay to share your applications db architecture like this?
@BashDroid
@BashDroid 17 күн бұрын
yes, because he mentioned that they had made this changes by looking on the specific data that are dealing with and anybody else doing the same thing with there data won't work the same
@cringelord511
@cringelord511 17 күн бұрын
@@BashDroid was this organized by zerodha or postgres?
@BashDroid
@BashDroid 16 күн бұрын
none, it's done by the postgres community in india.. pgconf
@sekhar4033
@sekhar4033 16 күн бұрын
What is his name
@rishiniranjan1746
@rishiniranjan1746 19 күн бұрын
People say c++ is retarded/obsolete. I dont agree. How you can achieve super-performace, responsiveness, better synchronous result without using a natively driven code.
@deva8496
@deva8496 17 күн бұрын
Sorry you are not Robinhood of India in trading. Robinhood offers research and lot of reasearch and recommendations with lot of features. But you are one of best discount broker to save money of swing traders
@thiccboi6211
@thiccboi6211 16 күн бұрын
It was a simple comparison for understanding the product and its domain. Its not an official statement of the company
@keerthineeraj7937
@keerthineeraj7937 14 күн бұрын
What is the name of the person speaking?
@gangadharm
@gangadharm 19 күн бұрын
Terabytes of data copied to a server and starting in less than a minute? Are you joking? Copying the data from S3 to your local server itself will take the time for terabytes of data. May be I am missing something here.
@Vikasptl07
@Vikasptl07 19 күн бұрын
Now you know reason why zerodha is down every now and then. Haha.. but on lighter note i think for trading broker they should have robust backup mechanism in place, s3 to db in minute is a dream scenario but that works for them so who knows
@haloboy777
@haloboy777 19 күн бұрын
I think they're not compressing the data. But that is way too wasteful.
@satyamverma
@satyamverma 19 күн бұрын
they must be loading that 500 GB of cache data or max 1TB.
@v.rajasekar5044
@v.rajasekar5044 18 күн бұрын
100% not possible even with newer instances with more than 100Gb of network speed. The ones with more than 200Gb of network speed requires special drivers and interfaces. Either he was bluffing or misremembering details. As they were partitioning by month, it could be possible that he is referring to restoring each DB hosting a month/s worth of data in under 2 minutes as that is possible. But data in that single server would be in the range of 1 or 2 TB and even then only with compression it is possible to do it under a minute.
@MrDasamitkumar
@MrDasamitkumar 19 күн бұрын
15tb in 2 mins !!! Really?? How ??
@v.rajasekar5044
@v.rajasekar5044 18 күн бұрын
100% not possible even with newer instances with more than 100Gb of network speed. either he was bluffing or misremembering details. As they were partitioning by month, it could be possible that he is referring to restoring each DB hosting a month/s worth of data in under 2 minutes as that is possible. But data in that single server would be in the range of 1 or 2 TB only.
@phoneix24886
@phoneix24886 7 күн бұрын
When did he say that?
@srinivasreddyt9555
@srinivasreddyt9555 9 күн бұрын
at 26:08, you realize that it is a mallu asking questions.
@kamleshgorasiya3854
@kamleshgorasiya3854 17 күн бұрын
Can share RCA for Issue we are facing since last two months. I am Software engineer and also Customer of Zerodha. I want to know why other broker are runing fine and zerodha not.
@Desh-o7b
@Desh-o7b 16 күн бұрын
no you are not, because if you were you would've asked this question from your team.
@chandranshpandey1929
@chandranshpandey1929 18 күн бұрын
too much tuning these guys are doing that their app having lot of glitches every now and then
@ShaileshGuptaKoolwallost
@ShaileshGuptaKoolwallost 17 күн бұрын
DB backup, restoring everyday. postgres as caching layer - it seems like they just want to rely on one thing only which is absurd. Seems like they are trying to find solution to problem which shouldn't have been problem as such. Totally absurd, they are ok with everything running, donot want to do things at higher scale. How can you be ok with such kind of system.
@battletremor
@battletremor 16 күн бұрын
What does he mean by checkpoints of data backup? As in they dont take entire backup from the start to current? Just a fixed period of time like a month?
@bangalicoder863
@bangalicoder863 4 күн бұрын
It means a delta load with a specific start point instead of a full load
@TeluguAbbi
@TeluguAbbi 10 күн бұрын
31:19 Postgres Learnings
@saralk18
@saralk18 7 күн бұрын
It works... until it doesn't
@DK-ox7ze
@DK-ox7ze 17 күн бұрын
No replica? So what happens if the DB crashes and data gets corrupted? You loose customer data!
@ShaileshGuptaKoolwallost
@ShaileshGuptaKoolwallost 17 күн бұрын
time to switch to another broker ? :P
@randomvideos9541
@randomvideos9541 18 күн бұрын
Ku6 bhi?? Pehle jo loss karwaye ho uske bare me video nikalo.
@AyushKumar-ij2xd
@AyushKumar-ij2xd 16 күн бұрын
overloading postgres is not helpful and dont do it specially when you have no concept of nodes . postgres servers are not free even. if you are not able to write code for sum/avg for close to same speed as postgres service then you need better engineering. Architectures become complicated when you have distribution/SOA . Either this is half knowledge served or this platform is running on hopes and dreams. And also S3 is not that fast
@krishankanhaya_
@krishankanhaya_ 13 күн бұрын
Caching is the answer to all of your questions in this talk 😂😂
@tanaygupta2009
@tanaygupta2009 11 күн бұрын
Caching might be a very bad idea in case of Trading apps.
@krishankanhaya_
@krishankanhaya_ 11 күн бұрын
@@tanaygupta2009 i may be agree but how
@GagandeepSingh-op8mb
@GagandeepSingh-op8mb 14 күн бұрын
Zerodha doesn't have replicas and doesn't have slaves. All they have is a sorry when they server or db crashes. People lose money, and they think replicas are not important.
@harshpathak8029
@harshpathak8029 18 күн бұрын
I think it is no longer the largest stock broker. Groww over took it since oct 2023
@SirShashanksonusahu
@SirShashanksonusahu 18 күн бұрын
Groww is stupid, just because of marketing it is gaining market share
@yuganderkrishansingh3733
@yuganderkrishansingh3733 18 күн бұрын
@@SirShashanksonusahu But that doesn't change the fact that they are the largest at present.
@prahladb5019
@prahladb5019 16 күн бұрын
now we understood why glitches are happening frequently in Zerodha..
@user-hh5vg9st1q
@user-hh5vg9st1q 17 күн бұрын
This is feels like a 3rd year B-tech class, not a techie presentation. The presented points can be found across multiple b-tech computer science books. May be he is not a tech person thats why he didnt gave the examples on tuning.
@gyanpattnaik520
@gyanpattnaik520 10 күн бұрын
Better if you can move to the cloud. AWS or Azure both provide great support.
@abhijithganesh2064
@abhijithganesh2064 15 күн бұрын
So much talk yet no stable apps😂
@TheHardikupadhyay87
@TheHardikupadhyay87 14 күн бұрын
i watched this video in 1.5x still felt slow and boring.
@asif-ali
@asif-ali 15 күн бұрын
Aaaaa.....aaaaaa.....aaaaaa......aaaaaaa.. Amm emmm aaaaaa aaaaaa... What that.... Silly
@ravikanth6178
@ravikanth6178 18 күн бұрын
Just out of ignorance.. I think snow flake willl be a good choice? Can anyone comment
@ravishmahajan9314
@ravishmahajan9314 18 күн бұрын
Only hardcore techies or IT professionals will find this video a Gem💎 . Well in the era of the Graph database, MongoDB, NOSQL etc. the legend in the video is talking basically about SQL database.😂 ❤ Yes he is definitely correct. With Oracle as an enterprise paid database, we have the king of open source database called Postgres, a boon for startups. I am really surprised, zerodha with millions of customers uses Postgres..... ❤ I thought they were using some high tech AWS virtual nosql databases 😂
@vaibhav-bhavsar
@vaibhav-bhavsar 15 күн бұрын
What is his name?
Google system design interview: Design Spotify (with ex-Google EM)
42:13
IGotAnOffer: Engineering
Рет қаралды 1 МЛН
Happy 4th of July 😂
00:12
Alyssa's Ways
Рет қаралды 69 МЛН
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 724 М.
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 62 МЛН
Iron Chin ✅ Isaih made this look too easy
00:13
Power Slap
Рет қаралды 35 МЛН
What is DATABASE SHARDING?
8:56
Gaurav Sen
Рет қаралды 911 М.
Passive Income From a Second Home? [AirBnb VS Rental]
18:01
Wint Wealth
Рет қаралды 164 М.
Google CEO Sundar Pichai and the Future of AI | The Circuit
24:02
Bloomberg Originals
Рет қаралды 3,1 МЛН
My Career Advice For Anyone Feeling Stuck In Life
7:26
Travis Media
Рет қаралды 89 М.
7 Must-know Strategies to Scale Your Database
8:42
ByteByteGo
Рет қаралды 83 М.
BEKMOBILDA Tecno Camon 30 smartfoni🔥🤩 #bekmobil
1:01
Bekmobil shorts
Рет қаралды 2,3 МЛН
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 62 МЛН
iPhone, Galaxy или Pixel? 😎
0:16
serg1us
Рет қаралды 1,3 МЛН