23: Multiplayer Battle Royale Video Game | Systems Design Interview Questions With Ex-Google SWE

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024

ความคิดเห็น • 53

  • @TheSakox
    @TheSakox 4 หลายเดือนก่อน +6

    This was an awesome video Jordan, thank you. I finally have a video I can send to my friends when they ask me to "just make a mmo game" and be rich

    • @ilikegeorgiabutiveonlybeen6705
      @ilikegeorgiabutiveonlybeen6705 4 หลายเดือนก่อน +4

      youll be giving them instructions like in a "fuck all" manner?

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน +1

      As one does

    • @sid6576
      @sid6576 4 หลายเดือนก่อน +2

      Just use unreal, this is a solved problem

    • @surajkumardwivedi7139
      @surajkumardwivedi7139 4 หลายเดือนก่อน

      @@sid6576 u can configure something u make to be more better, just like u use udp for faster speed although tcp is so cool

  • @satyamk28
    @satyamk28 4 หลายเดือนก่อน +2

    Hey Jordan, your videos are really good. I have a system design interview coming up. I am really learning a lot from your videos. Thanks a lot.

  • @NBetweenStations
    @NBetweenStations 4 หลายเดือนก่อน +3

    Great video! In a similar theme it would be great to see a Multiplayer Matchmaking Service design.

  • @Doomer1234
    @Doomer1234 4 หลายเดือนก่อน +2

    Thank you Jordan I am a new grad, but I got hooked on your videos because of your jokes. Hehe I’m pretty sure I’m learning system design through laughter. i guess i would be first senior new grad engineer :D

  • @ayonsamajder
    @ayonsamajder 4 หลายเดือนก่อน +11

    This escalated too quickly

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน +9

      You sound like my therapist

    • @deadlyecho
      @deadlyecho 3 หลายเดือนก่อน

      😂😂😂😂😂​@@jordanhasnolife5163

    • @deadlyecho
      @deadlyecho 3 หลายเดือนก่อน

      😂😂​@@jordanhasnolife5163

  • @InnocentEX
    @InnocentEX 4 หลายเดือนก่อน +2

    My boy never misses an opportunity to push something to Kafka. Noice.

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน +1

      Lmfao
      They say I'm a big fan of spilling my data to disk

  • @vipulspartacus7771
    @vipulspartacus7771 4 หลายเดือนก่อน +1

    Hi, Jordan, really appreciate the content, will you consider sharing your notes in as in format, with a huge asterisk that they can be wrong. It's just that I have a couple of interviews this month and want to revise all the designs but going through the all the older videos is time consuming.

  • @MK-qp2uv
    @MK-qp2uv หลายเดือนก่อน +1

    Hey Jordan, thank you very much for your hard work. Do you mind doing a little clarification on where the load balancer is in the final diargam? Is it a part of the Master Server? Somehow I follow the whole idea until the final roadmap where I got completely confused.

    • @jordanhasnolife5163
      @jordanhasnolife5163  หลายเดือนก่อน

      The master server basically caches the zookeeper nodes which tell it which servers are responsible for which regions of the game map, and returns their address to the user accordingly. If the user is close to out of bounds in that region server, it can reach back out to the master server to get the address of the adjacent region server.

  • @yuanyizhang8228
    @yuanyizhang8228 4 หลายเดือนก่อน +1

    Hey Jordan, I really like your videos! They are super helpful for learning system design, as a junior I learned a lot from your videos. Also wondering if it is possible to see a design about meeting scheduler, a friend of mine meet this question during her interview, she is not sure about the database design. Curious to see a Jordan solution!

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน

      For sure, I do have plans to eventually make a Google calendar type of video. Thanks!

  • @abalasky_swe-rt8el
    @abalasky_swe-rt8el 3 หลายเดือนก่อน +1

    Its funny that this game state design shares a lot of similarities with building orderbooks in hft hehe

  • @RaviMenu
    @RaviMenu 4 หลายเดือนก่อน +1

    It would be great to explore how this system can be adapted for other games like Chess. While many components may remain similar, the constraint of write conflicts, storing game state may not be applicable to Chess.

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน +1

      I actually think chess is much easier. Game state is super constrained, you can definitely get away with a game per partition, and state changes far less frequently. Agreed there will be a lot of shared pieces but at least for the stuff covered in this video I think most of it is probably less relevant.

  • @whereisinfinity
    @whereisinfinity หลายเดือนก่อน +1

    Since you are partitioning the game servers by regions (say 4 regions per game on an average), that would mean that if there are a million games running concurrently, then the system would need 4 million partitions!
    Am I correct in my understanding? And if yes, then will all these partitions be separate physical machines or VMs?

    • @jordanhasnolife5163
      @jordanhasnolife5163  หลายเดือนก่อน

      You are correct in terms of the number of partitions, but it is not the case that each partition needs to be a separate physical machine. Partitions are just units of work, and can be distributed as necessary (or perhaps not necessary).

  • @parteeks9012
    @parteeks9012 4 หลายเดือนก่อน +3

    Jordan has yes life

  • @Anonymous-ym6st
    @Anonymous-ym6st หลายเดือนก่อน +1

    played PUBG many times but never thought of building one of it lol. One quick question on dynamic partition, this sounds similar to most of the other dynamic partition (monitor load with heartbeat, prepare replica, build all connection, move some clients' connection), anything special for this case? is R1a and R1b share the same region map (or they are splitting)?

    • @jordanhasnolife5163
      @jordanhasnolife5163  หลายเดือนก่อน

      I think the process you described makes a lot of sense in this particular case!

  • @garymelvin8577
    @garymelvin8577 3 หลายเดือนก่อน +1

    I don't think you can call it the "master" server anymore. I think it's called the "Jordan" server now.

  • @JonathanMontag-wn2vs
    @JonathanMontag-wn2vs 3 หลายเดือนก่อน +2

    Subscribed after realizing you are the rizzlord

  • @ChillWithAbhishek
    @ChillWithAbhishek หลายเดือนก่อน +1

    For a game. Can we partition by game_id and not regions. If I understand correctly, you are saying that all games for a region are handled by the same server. But if we shard by game_id, we can have specific instances of the game being handled by specific game servers. And if all the users connect to the same game server then we don't have the issue of write conflicts. What will be the pro/cons of the above approach compared to your approach?

    • @jordanhasnolife5163
      @jordanhasnolife5163  28 วันที่ผ่านมา +1

      Yes - we're absolutely sharding by game id, this was being done under the assumption that within a game id we'd have too much load to put that on one server and might have to shard further.

    • @ChillWithAbhishek
      @ChillWithAbhishek 28 วันที่ผ่านมา +1

      @@jordanhasnolife5163 I see thanks for explaining. In system design the thing is in some of the designs I haven't designed something like that so sometimes the scale doesn't seem obvious. So basically the games can be so intense that even on a single server we need the region servers. So kind of you have a hierarchical structure on game_id -> region_id.

    • @jordanhasnolife5163
      @jordanhasnolife5163  27 วันที่ผ่านมา

      @@ChillWithAbhishek Yep!

  • @kushagragupta2769
    @kushagragupta2769 4 หลายเดือนก่อน +1

    Hi Jordan, regarding partitioning the game server. Instead of region, can we use game id as partition key, In this way all the players for a particular game will go the same server

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน +1

      Yeah, that might not be enough though. This is if you have to partition within a game.

  • @htm332
    @htm332 4 หลายเดือนก่อน +1

    Wouldn't the multipartition lock strategy introduce a lot of latency if too many players are cross-region? Or maybe I'm misunderstanding what the lock is key'd on specifically

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน +1

      So cross region in this case means on the other side of the game map, not like I'm in america you're in asia.
      Ideally, all "region servers" will be colocated in the same data center, and so will the lock. It definitely does introduce latency, but the hope is that we don't come across these types of writes too often.

  • @BlindVirtuoso
    @BlindVirtuoso 4 หลายเดือนก่อน +1

    Hi Jordan. Nice video, appreciate it. Though I didn't get the point of having master server in front of region servers. Can you clarify please?

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน

      Its basically the load balancer

    • @BlindVirtuoso
      @BlindVirtuoso 4 หลายเดือนก่อน

      @@jordanhasnolife5163 Thanks

  • @surajkumardwivedi7139
    @surajkumardwivedi7139 4 หลายเดือนก่อน +1

    Jordan, I am confused, if we already have servers based on region why even make a game with multiple regions cant we restrict the gameplay based on region itself like eg: asia region players will play amongst themselves, and so and so (I think valorant executes this)

    • @surajkumardwivedi7139
      @surajkumardwivedi7139 4 หลายเดือนก่อน +1

      PS love your grind, I really appreciate your efforts and although clout works fc it, its shallow and has hardly a good ending
      PS also your audio and ur camera video is not in sync

    • @itsaugbog
      @itsaugbog 4 หลายเดือนก่อน +1

      Just to clarify this as I was also a little confused but understood after, when Jordan talks about "regions" and splitting them up into different game servers to reduce load, he is not talking about matchmaking and where users are in the world. He is talking about the actual in-game map and splitting that map up into different regions. For Battle Royale games, the maps are ridiculously large and not everything in the game map needs to be accessible to every single player (just the things closest to them). By splitting the game map up into different regions and then partitioning the game servers by the different regions in the game map, you can reduce the load pretty significantly. He then talks about how edge cases where now at certain parts of the map where regions collide, users will have to be able to read/write across partitions where he talks about LB and distributed locks to help with these cases.

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน +1

      @itsaugbog is correct, we aren't sharding the world, we're sharding the actual video game terrain. My audio and video are never gonna be in sync :(

    • @surajkumardwivedi7139
      @surajkumardwivedi7139 4 หลายเดือนก่อน +1

      @@itsaugbog thanks for the explanation

  • @idioma895
    @idioma895 4 หลายเดือนก่อน +1

    hey jordan, please update notes on gdrive, you havent shared latest video slides there

    • @jordanhasnolife5163
      @jordanhasnolife5163  4 หลายเดือนก่อน

      You are correct, will do this all in batch in 1-2 months.

    • @idioma895
      @idioma895 4 หลายเดือนก่อน

      @@jordanhasnolife5163 please try to do it asap, I need them for revision

    • @idioma895
      @idioma895 4 หลายเดือนก่อน

      @@jordanhasnolife5163 please try to do it asap, I revise from these notes only