no complaints other than the font used in the canvas.
@willmalisch4 күн бұрын
I think more detail could have been given on why you used Kafka. I understand how it makes sense, but maybe walking through a couple data flows would have made it more clear.
@RAMII197805295 күн бұрын
I'm not trying to be difficult, but I don't understand how using a bearer token or jwt is any different / better than having the user send their username and password with each request. If the bad actor has a way to see the request, they could just copy and use the token, just the same as they could copy the username and password, which needs to be sent to create a token to being with. I think this is why using HTTPS is so important.
@quachhengtony76515 күн бұрын
Can you name some of these traditional message queues?
@MashaoleMogale5 күн бұрын
during the process of notifying the driver to either accept or deny why not send to lets say 5-10 drivers closest to rider and the first to accept gets it and all the responses sent to a queue and if theres a driver for the driver the rest get rejected for that trip , this would improve user experience as users would spend less time searching for a driver instead of waiting for 1 drivers response then switching to the next which can take up some time
@wolfgangleon83627 күн бұрын
This is a great video for large distributed systems.
@Lifestudent-14 күн бұрын
Wow👏👏👏👏👏👏👏👏 nailed it 💯👌
@fireball787b14 күн бұрын
imho, the downside of the timeseries db is that you will repeat calculations every time you want to know the total downloads or the top ones. In that case, I would have stored the data in the database on a field that counts the total downloads and then search from there. The issue in this case is that you will probably have deadlocks or concurrency problems because of the reads and writes, mostly on the top used apps. in this case, the db should be sharded so reads occur in one db shard and writes on the other ones. then automatically the db will update the data from one shard with the other ones. Aside from that, great design and i think the combination of db and elastic is a great choice
@TheMdaliazhar15 күн бұрын
Explanation is good but Its not comprehensive. One can't quality a system design interview based on above video for the given topic.
@tanthole030616 күн бұрын
Doesn't this design make Kafka the bottleneck for the whole architecture?
@latuconsinafr20 күн бұрын
What kind of terminal do you use?
@interviewpen18 күн бұрын
That's Warp! www.warp.dev/
@shreyaspatange865322 күн бұрын
annnnnnnnnnnnd you infra cost will be 50k and need engineers worth 200k for maintainance
@nirmalgurjar818123 күн бұрын
This guy is talking like Sidhi baat no Bakwas.
@babayaga562026 күн бұрын
Oh put their data center in the damn Ohio lmao, fire content btw
@interviewpen25 күн бұрын
Ohio has cheap electricity and cheap real estate :D Thanks for watching!
@user-ti8cm3mh1w26 күн бұрын
Very impressive
@interviewpen26 күн бұрын
Thanks!
@AndyThomasStaff27 күн бұрын
This seems like a video designed to make people fail system interviews. "Kafka," "load balancer," "websockets" are generic system design concepts you are randomly tacking on.
@interviewpen27 күн бұрын
Well, we always try to go over the reasoning for adding complexity-of course smaller systems can be far simpler. But there’s of course much more to it than we can discuss in a 15m video. Thanks for watching!
@LuisVarela-d8m27 күн бұрын
A
@EntertainerOnline29 күн бұрын
I'm not sure if I understood correctly but why are we not using any ES cluster to speed up our search? No DB can be as efficient as ES when it comes to search.
@interviewpen29 күн бұрын
ElasticSearch is essentially a sharded db with full text search at its core, so a properly architected database will do the same thing. But you’re absolutely right-es is certainly a viable solution if we want a pre-built solution.
@jephthahsnr6558Ай бұрын
🔥🔥
@interviewpenАй бұрын
Thanks for watching :)
@dirty-kebabАй бұрын
I feel like this is useless because you just tell us the answer, how and why.
@interviewpenАй бұрын
Ok, sorry to hear that. We do our best to build the system from the ground up, starting from a simple system, understanding why it doesn't scale and how to improve on it. We'll try to do better in the future--if you have any more specific feedback, please let me know.
@Rhly001Ай бұрын
@@interviewpen It's not useless at all while I do agree breaking down the problems further and putting more thought into it rather than jumping directly to the solution would help the users learn more and think for themselves but this content is still really valuable, and I can't thank enough for your efforts. Keep putting out more such videos. I really enjoy watching them and maybe leave some questions or projects unanswered too for the users to figure out.
@Get_YT_Views_940Ай бұрын
Remember that you have the power to control your thoughts and emotions. Choose positive thoughts, practice mindfulness, and let go of negativity that doesn't serve you.
@abdullahsharif4291Ай бұрын
What is the name of the pen softwere used for explaining on the screen?
@interviewpenАй бұрын
We use GoodNotes on an iPad. Thanks for watching!
@vinayak6564Ай бұрын
I feel it doesn't make sense to put chunks in queue, direct client having access to a messaging-queue-system is not practically good idea from security perspective. Also it doesn't reduce load anyhow as messaging queues also need to be scaled if not injestion servers, so it is just adding extra layer just for the sake of adding. Correct me if I am wrong.
@vinayak6564Ай бұрын
Only messaging queue for notification service makes sense.
@interviewpenАй бұрын
The idea behind this was that if there are bursts of load, it wouldn't slow down users uploading their data. But I fully agree with you that it doesn't make sense for a client to have direct access, so it's not a very useful solution in this case. A better solution might be to use a tiered storage system behind our BLOB store which can provide very fast reads and writes for frequently accessed data while moving older data to cheaper storage mediums. Thanks for watching!
@vinayak6564Ай бұрын
@@interviewpen Thanks for the prompt response and answer! Great content btw finished watching blob storage system design after this.
@vietnguyenquoc4948Ай бұрын
Can you do a design for versions control system?
@interviewpenАй бұрын
I'll add it to the backlog :)
@cool_guy_VaibhavАй бұрын
Good explanation
@interviewpenАй бұрын
Thanks!
@CristianAbranteАй бұрын
Hello! Which app do you use in your iPad to draw diagrams and explain the concepts? Great video! 👏
@interviewpenАй бұрын
Thanks! We use GoodNotes.
@abhibhagat7767Ай бұрын
Why not enable RAID and set the correct level?
@shabarinathk8954Ай бұрын
my thought exactly. but people these days need to complicate everything
@ralphardАй бұрын
Assume you have to store across multiple computers, RAID doesn’t save you from the host attached to the RAID card dying
@interviewpenАй бұрын
When we're dealing with a single node, RAID is of course a great way to implement the concepts we discussed. When dealing with more than one node, we have to do replication over a network, which requires software solutions. Thanks for watching!
@Zmey5656Ай бұрын
You always need to think about replicas
@ehzaАй бұрын
nice
@interviewpenАй бұрын
Thanks!
@tidenlyАй бұрын
Its nice you showed both options using JWTs and simple session IDs. I see lots of people jump straight for JWTs because its newer, without thinking about the actual pros and cons. Generally the first question should be *can* your system actually do stateless authentication? For many financial services for example, a business requirement will be instant reflection of updates to permissions or session revocations - to implement this in JWTs you need to constantly check a blacklisted token table - immediately nullifying the benefit of stateless auth. There's also the question for many apps - realistically how many types of action can the user make anyway that won't be hitting the database / reddis at some point already? Considering the complexity that can come with JWTs, for simple apps I often find myself reaching for session IDs first, with certain components using stateless. I've yet to work in a company where even a few minute lag between permission updates is acceptable on the app itself. There's also some hybrid patterns, the satellite app authenticates with an internal auth server, recieving a JWT. That JWT is then hashed into reddis as a session token, and sent to the user for user <-> api auth. It's important people actually ask these questions to the interviewer before picking their solution!
@PalataoArmyАй бұрын
Sir, this is golden. Thank you!
@interviewpenАй бұрын
Thanks for watching!
@DavidDLeeАй бұрын
Here are some of the issues in this design. 1. The cache and timeline construction are the most difficult to solve, yet we know too little on how it is arranged 1.1. Sure, if you have only 2 users, it will scale well. But, what if you have 180M followers to Musk? Will you fan-out 180M cache and database updates for a single tweet? 1.2. It completely ignores geography. What if the DB shard for Elon is in Texas and his followers are spread across the world? 1.2.1 Where do you store data for a user from a specific country? What if they travel? 2. Social graph. 2.1. It sounds like on every tweet write, you query the social graph to figure out where to fan out. How does this work to scale? How many shards do you need to read to know even where to fan out too? 2.2. What if a user unfollows? 2.3. Where is the graph stored. The design presented will not scale well to the millions and billions of users.
@interviewpenАй бұрын
Thanks for the thoughts. You're right that this design fans out to all followers, so we're sacrificing write speed for users with many followers in order to maintain read performance for the majority of users. As you note, there's many other details we could dive into, such as using a social graph and implementing geographic sharding. Thanks for watching!
@DavidDLeeАй бұрын
Client supplying timestamp "is a bad idea. Let's do it anyway"
@webcorejuanАй бұрын
Awesome, which software do you use?
@interviewpenАй бұрын
We use GoodNotes on an iPad. Thanks for watching!
@webcorejuanАй бұрын
Thanks for the video! which platform are you using to note?
@interviewpenАй бұрын
We use GoodNotes on an iPad.
@TravalaАй бұрын
Thanks, I really like the videos! But (in my personal opinion) it would be much easier to perceive information if you took some pauses when you speak. Otherwise, videos are really helpful! And one of the topics I would love to know more about is how systems like Apache Spark or Hadoop work internally, what are the specific use cases and etc. Thanks again!
@interviewpenАй бұрын
Ok, thanks for the feedback. We do have multiple videos on Spark/Hadoop in our full course on interviewpen.com :)
@congminhluu5068Ай бұрын
I'm dumb so any help would be appreciated. Why are hash join on 100 rows tables faster than hash join on 10 rows tables ?
@interviewpenАй бұрын
It isn’t-we prefer the plan that filters the tables first, since fewer rows have to be joined that way. Thanks!
@xxbighotshotxxАй бұрын
Thank you for sharing this! This seems to be a common system design problem. I've gotten a variant of this at least twice now from companies that I've been interviewing with
@djseber3357Ай бұрын
would you be available for consulting
@interviewpenАй бұрын
Sorry, not at the moment. Thanks for watching!
@Kevin-cg7qkАй бұрын
I feel like my Pokemon is about to evolve!
@tonynguyen-mq3tbАй бұрын
🎯 Key points for quick navigation: 00:00 *📚 What is a database and how queries work?* - Database takes in SQL queries to retrieve data. - SQL is declarative, focusing on what data is needed not how to get it. - Internal complexities of a database translate declarative queries into execution steps. 02:09 *🧠 Process of executing a query in a database* - Database query process involves parsing, query planning, and execution. - Parser translates SQL query into a data structure for the database to use. - Query planner optimizes query execution and evaluates different plans based on database characteristics. 03:32 *🔍 Role of parser in database query execution* - Parser converts raw SQL text into a parse tree for easier database evaluation. - Parse tree organizes query components like select, from, and where clauses for database use. - Use of parse tree allows the database to recursively evaluate query components. 08:12 *⚙️ Query planner in optimizing database query execution* - Query planner considers table statistics, cost constants, and available indexes for query optimization. - It generates multiple plans, evaluates costs for each, and outputs the most efficient plan. - Optimizing query planning leads to faster and more efficient database query execution. Made with HARPA AI
@amirphl7834Ай бұрын
This interview misses critical discussions about the way we send new tweets to the user. I think this system doesn't work as expected. specially having a limit list in Memcached. For example, what if someone has 30 million followers?
@interviewpenАй бұрын
Yes, having a large number of followers would increase latency when making a new tweet. This is a tradeoff-we’re optimizing for fast timeline loads over fast posts. Thanks for watching!
@mohitnagpalАй бұрын
Your videos are very helpful and to the point.
@interviewpenАй бұрын
Glad you like it :)
@thelostandunfoundsАй бұрын
Solve the payment processing by switching to bitcoin only payments.
@kspv2806Ай бұрын
Awesome thanks a lot
@interviewpenАй бұрын
Thanks for watching!
@ak-gi3euАй бұрын
how algorithms works video plz
@Zmey5656Ай бұрын
Thank you a lot for your video. Maybe next time tell us about the pros and cons of SQL? For example, that is invented in the 80s and that it is ineffective when working with a large amount of data?
@interviewpenАй бұрын
Absolutely--we have a full video about different data models and storage formats (like NoSQL) on interviewpen.com :)