A bug in the GitHub's Rate Limiter
18:35
Пікірлер
@abhishekpathania7093
@abhishekpathania7093 15 минут бұрын
doubt, so now 1st leaf node (block) contains 3 rows, when we update its 1st row to an extent that it occupies whole space of the node leaf (block), will the rebalancing happen on the 1st leaf node & a new node will be created for 2nd & 3rd row ? how will this look like ?
@AsliEngineering
@AsliEngineering 8 минут бұрын
Read more about B+ Trees, you will answers to all the questions you've asked.
@abhishekpathania7093
@abhishekpathania7093 23 сағат бұрын
1. Are indexes sorting again & again on inserting new data. 2. then does data also move from 1 block to other block after index resorting.
@AsliEngineering
@AsliEngineering 2 сағат бұрын
1. They use data structures that keep data ordered. No need to sort again and again. Check b plus trees 2. Yes. And that's rebalancing phase of b plus trees
@DaveLegend-g8o
@DaveLegend-g8o Күн бұрын
I love the fact that you make reference to real life applications and examples
@adityaanand4496
@adityaanand4496 Күн бұрын
but for the file case also we can't we do a similar operation of reading the entire file, bringing it into memory and then shifting the data around and finally flushing it back to disk. What advantage does B+ tree offer, I mean the only one which I can think if is that in case of B+ tress you wont have to touch the entire data but rather only those specific 100 rows, then can't have a design where we store 100 rows on file and the next 100 on another file and achieve the same output/performance ?
@yuktigirdhar
@yuktigirdhar 2 күн бұрын
You mentioned in the first approach that while updating a row we cannot automatically move beyond the the size of the width of the row but later as you mentioned we have a fixed row size so in what case we will be exceeding the width and overwriting other data for the naive file storage approach?
@YasinTahaErol
@YasinTahaErol 3 күн бұрын
Thank you! You are very helpful 🙏
@santanuhalder9306
@santanuhalder9306 3 күн бұрын
What iPad note application are you using?
@vickymar3836
@vickymar3836 4 күн бұрын
great video, a fan from linkedin
@veereshrg1385
@veereshrg1385 5 күн бұрын
Hi Arpit, please do correct me if I'm wrong. Load factor signifies how much the hashtable is filled. So mathematically it should be (# of Entries / Size of Hashtable) So if we say that Load factor = 50%, it should be = 1/ 2 => 0.5 But in this video you have mentioned for 100 / 75 for a LF = 75%. Shouldn't it be the other way ( 75 / 100 ) ?
@letsmusic3341
@letsmusic3341 6 күн бұрын
Great video. I have fxcxew questions: 18:30, Would leader node applies the updates to the table in realtime or async updates like followers in case of eventual consistent reads. Also, what happens to writes in consistent writes? Who updates partition data in Metadata service? What will happen if my data storage node has capacity of 1000IOPS and I have two partitions P1, P2 of 400 each of two different tables T1, T2(of different customers). Now client requests for 800 IOPS on T1 for P1. Now the required IOPS are 800(T1, P1)+400(T2, P2)=1200IOPS but server only supports 1000. How the server would handle this load in case of adaptive load? Also, please consider the case when partition 2 also needs at-least 400IOPS at any time. The customer don't want any latency as I've paid.
@ShreeharshaV
@ShreeharshaV 6 күн бұрын
Great video, Arpit. QQ: Isn't scatter gather considered to be bad practice in distributed env? What if you scatter a query to one of the leaf node and that takes longer time to return the response? It will lead to slowness of entire scatter gather process right?
@AsliEngineering
@AsliEngineering 6 күн бұрын
1. no it is not. 2. either wait, or be okay with partial results. depends on what your database is solving. Also, if you are okay with spending a little extra on infra, then you can always add more replicas for shard to scale reads. hierarchical scaling.
@194sandy
@194sandy 6 күн бұрын
Next Cockroach DB please
@AsliEngineering
@AsliEngineering 6 күн бұрын
Already have a podcast with Ben - kzbin.info/www/bejne/r5nUiGtogMZgndksi=JyFRYVnOMFl34jmq
@saurabhsuman4960
@saurabhsuman4960 7 күн бұрын
How the read will work if copy will take days, please explain this part too
@AsliEngineering
@AsliEngineering 6 күн бұрын
You do an inplace migration.
@ranjeetnair5467
@ranjeetnair5467 8 күн бұрын
Superb explanation Arpit with good examples helps to grasp the concepts easily.
@kaal_bhairav_24
@kaal_bhairav_24 9 күн бұрын
SELECT u.user_id, u.username, COUNT(b.blog_id) AS blog_count FROM users u LEFT JOIN blogs b ON u.user_id = b.user_id GROUP BY u.user_id, u.username ORDER BY blog_count DESC;
@charan775
@charan775 11 күн бұрын
what about using pessismistic locking + skip locked? this will help in threads not getting blocked right?
@AsliEngineering
@AsliEngineering 11 күн бұрын
Yes. It will, but it should suit your usecase. Because not everytime you can skip locked rows.
@PRITESHKRSRV
@PRITESHKRSRV 11 күн бұрын
Can I do these 2 projects in C++ ? Will it help to learn the same or have to go with C ?
@AsliEngineering
@AsliEngineering 10 күн бұрын
Yes. Do it in C++ not much difference.
@nehagour6928
@nehagour6928 11 күн бұрын
Wow explanation Arpit
@AsliEngineering
@AsliEngineering 9 күн бұрын
Thanks Neha!
@saurabhsuman4960
@saurabhsuman4960 11 күн бұрын
Thanks Arpit. These explanantions makes learning fun.
@yomanthunder
@yomanthunder 11 күн бұрын
thanks a lot , this concept made my day
@zdevpro
@zdevpro 12 күн бұрын
are you gujarati bhaiya ?
@AsliEngineering
@AsliEngineering 12 күн бұрын
Yes.
@zdevpro
@zdevpro 12 күн бұрын
@@AsliEngineering great i got it from your surname btw are you bornn and brought upin gujrat ?? btw you are kathiyawadi ??
@zdevpro
@zdevpro 12 күн бұрын
@@AsliEngineering i like your in depth video for any system and concept
@venkatajagannath6014
@venkatajagannath6014 12 күн бұрын
Thanks a lot for this video, would really love to understand working of @Timer and the nuances of implementing the same. Can you explain that ?
@luna0609
@luna0609 12 күн бұрын
Loved the hack to make chaining cache friendly. Would also please provide the links to papers you have read?
@AsliEngineering
@AsliEngineering 12 күн бұрын
You can find them on my website arpitbhayani.me
@vj15518
@vj15518 12 күн бұрын
One of the best tech podcast which talk real to the ground. sidhi baat no bakwas. Many learning hidden for new startup founder and CTOs.
@gauravkhandelwal8377
@gauravkhandelwal8377 13 күн бұрын
@arpit bhayani - Can you share slides or notes.
@shubhamjalan2440
@shubhamjalan2440 15 күн бұрын
If you have gone through the video: In the final approach, incrementing the atomic operations are still a bottleneck. They will be causing thread contention. ( Multiple threads waiting to do the atomic operation ) Fixing this will be an interesting challenge. Kudos to the maker, this is an amazing video.
@cyberonymous4100
@cyberonymous4100 15 күн бұрын
This is exactly my understanding of a protocol is, after working on several protocols for the last few years! It’s amazing to see such content for free! This drawn me the interest to check your other videos too! Keep up the good work brother!😇
@arpitjaiswal5275
@arpitjaiswal5275 15 күн бұрын
Mine actually took 35.2x seconds, very fair
@snlagr
@snlagr 16 күн бұрын
17:04 hard deleting is hard on the DB 😂 So rate limiting can just be part of business logic without explicitly specifying it? aka not necessarily a separate component or something complex
@AsliEngineering
@AsliEngineering 16 күн бұрын
yup. You do not need a microservice for everything.
@Shreenidhi110
@Shreenidhi110 16 күн бұрын
usefull content...thanks!
@suryaakella4508
@suryaakella4508 16 күн бұрын
Hey Arpit, Can you please make a video about Aws aurora ?
@snlagr
@snlagr 18 күн бұрын
how does joins work with vertical sharding where individual tables are moved to different databases, complex queries will be affected right?
@sumanshverma1234
@sumanshverma1234 18 күн бұрын
Quick question : How can I keep fetching live data from an API endpoint and ingesting it into a database . Right now , I use a cron job to fetch via a script the newly updated records once a day . How can this be done in realtime ?
@HarshalVoonna
@HarshalVoonna 18 күн бұрын
Thanks for the great video. Follow up question: How is "scatter gather" fast? What if one of the nodes to which query was sent took longer than others? In that case it would delay the entire process, isn't it?
@AsliEngineering
@AsliEngineering 18 күн бұрын
this is beneficial when you have CPU intensive workload.
@niravshah6934
@niravshah6934 18 күн бұрын
I found this video and your entire channel both interesting and amusing :) Fantastic videos. Simple to understand yet in depth. Keep up the good work my friend!
@snlagr
@snlagr 19 күн бұрын
postgresql has generate_series function which can be used to create counters directly :)
@x_x3557
@x_x3557 19 күн бұрын
why are live objects unmarked after one phase as they can continue to be live in the next phase as well ?
@raj_kundalia
@raj_kundalia 19 күн бұрын
Thank you for doing this!
@nehagour6928
@nehagour6928 20 күн бұрын
Arpit Most modern systems today follow a non-contradictory design approach. Examples are like Uber, Swiggy, and Flipkart. I cannot think of real time example of spiral designs I saw in office in any of my orgs where I worked on. I will think more on this :)
@yogeshshahi
@yogeshshahi 20 күн бұрын
It has a huge application in blockchain, cosmos sdk heavily uses embedded databases
@omprakashyadav-hf4pg
@omprakashyadav-hf4pg 20 күн бұрын
Amazing efforts to provide high level of dynamoDB paper. Engaging video overall. Is there any plans for MongoDB?
@pavan4533
@pavan4533 20 күн бұрын
Database resilience 25:00
@pavan4533
@pavan4533 20 күн бұрын
I Like the concept of hockey spike when dhoni is on field Intresting 21:46
@ankk98
@ankk98 20 күн бұрын
Nobody talks about these important bits on which the systems are built up on. Good to hear someone talk about them.
@__nitinkumar__
@__nitinkumar__ 20 күн бұрын
I don't understand this part: @19:25. You say: "Your same event could be consumed by multiple services" How? (in terms of Kafka) From what I understood, for a topic you'll have a consumer group, but an event will go a particular partition where only 1 consumer can listen to that. (That's what Kafka does, right?) So how does this statement stands "Your same event could be consumed by multiple services"? What am I missing? Please help!!
@__nitinkumar__
@__nitinkumar__ 20 күн бұрын
@AsliEngineering, please answer
@AsliEngineering
@AsliEngineering 20 күн бұрын
Each service is a consumer group and the same event is consumed by multiple consumer groups. You got it right. The messages does go in a partition of a topic, but that same msg can be consumed by different consumer groups.
@__nitinkumar__
@__nitinkumar__ 20 күн бұрын
@@AsliEngineering Thanks for replying, seems like I understood now, will rewatch again though for proper undestanding. I am just preparing myself before I enroll for a cohort.
@bhavukkalra1786
@bhavukkalra1786 20 күн бұрын
Hey there Arpit! Amazing presentation. Is there a way we can download the notes in some kind of pdf if available?
@snlagr
@snlagr 21 күн бұрын
when we provision/shift to green infra, is DB also replicated generally? Or its same for both instances - considering there can be schema/migration changes edit - had commented mid way, turns out DB is covered in limitations :) thanks!
@Jagrati
@Jagrati 21 күн бұрын
in chrome/windows, I am having to manually (or using shortcut) activate hypothes-is on each tab, any solution? thanks
@18potboy
@18potboy 22 күн бұрын
What note taking app and pen are you using for this setup ?
@charan775
@charan775 22 күн бұрын
why to write in mySQL? why couldn't scheduler read from kinesis to retry?