How Discord Stores TRILLIONS of Messages

Поделиться
HTML-код
  • Опубликовано: 9 июн 2024
  • Have you ever wondered how Discord is able to store trillions of user messages without breaking a sweat? In this video, we'll take a deep dive into the technologies and strategies that Discord's software engineers use to manage such a massive amount of data.
    SOURCE: / discord
    Discord is one of the most popular communication apps in the world, with over 250 million users and counting. With such a large user base, Discord's servers receive an enormous amount of messages every day. To store all these messages, Discord employs a distributed database system that runs on hundreds of servers worldwide.
    This system uses a variety of modern database technologies, including Cassandra, Redis, Elasticsearch and most recently: ScyllaDB to ensure that messages are stored reliably and efficiently. These databases are designed to handle huge amounts of data and provide fast read and write capabilities, making it possible for Discord to scale to millions of users without compromising performance.
    So if you've ever wondered how your messages are stored on Discord, or if you're just curious about how modern database technology works, this video is a must-watch. Join us as we explore the world of distributed databases and learn how Discord's software engineers keep trillions of messages organized and accessible for millions of users around the world.
    👻 MY NEW STARTUP: www.caspr.ai/
    MY NEWSLETTER 💌
    thebetter.dev
    ------
    CONNECT WITH ME ON SOCIAL
    📸 Instagram:
    / lewismenelaws
    🎚TikTok:
    / lewismenelaws
    🐣 Twitter:
    / lewismenelaws
    --
    My gear 💻
    liinks.co/lewismenelaws
    -----
    TIMESTAMPS ⏰
    0:00 Intro
    0:38 The BackStory
    1:46 Cassandra Troubles
    4:09 Change Architectures
    6:28 Data Services
    8:57 The BIG Migration
    10:35 Where It's at now
    11:40 What we can learn from this
    12:46 Thanks for watching and subscribe :)
  • НаукаНаука

Комментарии • 585

  • @CodingWithLewis
    @CodingWithLewis  Год назад +230

    Thanks for watching this video :) What company would you like me to cover next?

    • @infinitelancer4612
      @infinitelancer4612 Год назад +18

      Reddit

    • @ExplodeCode
      @ExplodeCode Год назад +3

      Do How ExplodeCode is cool. naa do snapchat or instagram or something based with pictures

    • @adill6295
      @adill6295 Год назад

      Rust roadmap

    • @akvamsikrishna5535
      @akvamsikrishna5535 Год назад +6

      How telegram makes money and how it stores as much as data like discord and much more (you too will get more questions once you start to think how telegram is able to do it 😅)

    • @akvamsikrishna5535
      @akvamsikrishna5535 Год назад

      And 😅 I want you and forrest knight to have a video together 🥺

  • @sorteslyngel2k
    @sorteslyngel2k Год назад +2035

    How the hell is discord even making money. That infrastructure sounds pretty expensive...

  • @jamoncitovideos
    @jamoncitovideos Год назад +466

    This types of videos are great. It's not common to face scenarios that have this massive scale and it's great to get to know how they have been handled before by other engineers

  • @puspamadak
    @puspamadak 11 месяцев назад +61

    The engineering was truly awesome. Have to salute the engineers as well as SyllaDB team for such a great product.

  • @demin-e
    @demin-e Год назад +26

    No © symbol next to “Rust”?
    Lawsuit is already being filled

  • @ryojikn
    @ryojikn Год назад +18

    This is amazing, please keep going.
    Such an amazing source of knowledge and inspiration in a perfect method for better engineers

  • @vaggelis_best
    @vaggelis_best Год назад +25

    11:24 Poor Descord engineers😢
    They are stressing even HARD

  • @5095smf
    @5095smf Год назад +103

    Nice! I love databases and learning more about them, great video.

  • @staticobjx7232
    @staticobjx7232 Год назад +15

    Hi Lewis, I discovered your channel thru YT Shorts, but I like this format a little better, not only it dives into architectural problems and solutions, in my opinion it is not rushed. Also, awesome graphics! Thanks a lot and more power to your channel.

  • @nerduser1000
    @nerduser1000 Год назад +8

    The type of content I love to watch thank you lewis!
    Had this question for Reddit how reddit saved and would love to know how discord works

  • @joshburger2217
    @joshburger2217 11 месяцев назад +12

    as a dev, just thinking about a migration of that scale is anxiety inducing

  • @cocoiyeah
    @cocoiyeah Год назад +244

    Kudos to the ScyllaDB team! I've been a fan of their product since 2019, and in my opinion, it's better than Apache Cassandra. However, their open-source license limits usage to only five nodes.

    • @Jecsham
      @Jecsham Год назад +33

      the ydeserve being paid for that product

    • @dominikmankowski1636
      @dominikmankowski1636 Год назад +17

      Not really. The 5 nodes limit applies only to ScyllaDB Manger, not the OSS database.

    • @pietrodc0
      @pietrodc0 10 месяцев назад +9

      72 nodes per 140mln users = ~1.9 users per node. 5 nodes limit = ~7.72mln users = you must have money for DB licenses 😅

    • @OT-tn7ci
      @OT-tn7ci 9 месяцев назад +2

      ​@pietrodcfab but that's not how it scales

  • @peckychicken
    @peckychicken Год назад +43

    Wow discord are really committed to keeping their app up to date

  • @NaviYT
    @NaviYT Год назад +23

    I was today years old when I learned that Lewis makes long form content.

  • @wonkywonky6307
    @wonkywonky6307 Год назад +34

    This is fantastic! Congratulations to all those amazing engineers and congratulations to you for making this great video. Thank you for bringing this content to us.

  • @smixqse
    @smixqse Год назад +6

    i love the way the subtitles interpreted scylladb: s db, mes db, solid b, sillydb, facilitydb, silladb, sil a db

  • @AdoSean
    @AdoSean Год назад +2

    Really fascinating video and well made. Thank you!

  • @ryanzspaulding
    @ryanzspaulding 5 месяцев назад +2

    I like your funny words magic man.
    Definitely didn’t understand about 95% of this video but it was really fascinating and well presented

  • @My.MusicChannel
    @My.MusicChannel Год назад

    This video was perfect omg!! Liked & subscribed, keep it up ❤️❤️

  • @weiSane
    @weiSane Год назад +88

    I'm waiting for the day discord switches to vector databases when they have to store zetabytes of messages 😂

    • @nuvotion-live
      @nuvotion-live Год назад +8

      I can see it happening. I’m sure the singularity will shake up technology a lot, and it does seem like vector databases will continue to become more popular

  • @nemzyxt
    @nemzyxt 10 месяцев назад +1

    Whoa! This is so enlightening, thanks Lewis! The engineers are doing really great work bts

  • @walterrodriguez9550
    @walterrodriguez9550 Год назад +1

    great breakdown and description, thank you!

  • @Luxcium
    @Luxcium 11 месяцев назад

    I am so happy 😁 to see how it goes with your channel and how much your topic is related to more advanced topics

  • @bobtheoutbuilder8552
    @bobtheoutbuilder8552 Год назад +10

    I can imagine reading discord messages from 47 years ago.

  • @bvorg
    @bvorg Год назад +5

    Everything is perfect. Thanks much Lewis!

  • @ThatBubbledGuy
    @ThatBubbledGuy Год назад +53

    Your channel needs to be more popular. This content is the only thing that motivates me to write some code after running into an error.

  • @TheMassgames
    @TheMassgames Год назад +5

    This types of videos are great, and your animations are really on point

  • @def1nt
    @def1nt Год назад +19

    Very cool format and interesting stories!
    I wish Discord to find frontend devs as good as their backend team

  • @costelinha1867
    @costelinha1867 Год назад +14

    Bold of you to mention the Rust language and use it's logo in this video. Considering what the Rust Foundation has been up to recently.... AND YOU SHOW A PICTURE OF THE LOGO IN A DIFFERENT COLOR... oh my god, I hope the foundation doesn't see this.

  • @xenofenus
    @xenofenus 9 месяцев назад +1

    This was an incredibly well made video!

  • @justingolden21
    @justingolden21 Год назад +1

    Love the video and also the short takeaways at the end

  • @BrendAn_RSA
    @BrendAn_RSA Год назад

    This is my first video on your channel. Loving it. Awesome video :)

    • @TNTISGOOD
      @TNTISGOOD 3 месяца назад +1

      agreed, my first video too! :D

  • @denitechYT
    @denitechYT Год назад +3

    Aha so now we know how! Great video man!

  • @JoeyClover
    @JoeyClover Год назад +7

    The concern you described at the end is a well known anti-pattern called the Golden Hammer. Don't get too comfortable with the tools you know and use.

  • @IgnitedIce81
    @IgnitedIce81 Год назад +3

    Never realized how incredible the engineering is on Discord

  • @Skeffles
    @Skeffles 4 месяца назад

    Great video. Fascinating to see how they solved this!

  • @somnathroy102
    @somnathroy102 Год назад +1

    Thank god yt recommended this. I learned a lot.

  • @Fingiorstyle
    @Fingiorstyle Год назад +1

    Thank you for this video! Please create more

  • @joker-wr8pt
    @joker-wr8pt Год назад +21

    Sir you're my inspiration these types are useful please bring more like this like how big system works so that we can have real-time understanding

  • @MultiSciGeek
    @MultiSciGeek 7 месяцев назад +2

    This is better than ASMR. Fell asleep in 8 minutes!

  • @Keys_02
    @Keys_02 Год назад +9

    Great content, please I want to learn about the internet from a developer's perspective what book are you going to recommend for me?

  • @felipheleal
    @felipheleal Год назад +1

    Excellent video 👏🏼👍🏼

  • @shloktadilkar5536
    @shloktadilkar5536 Год назад +2

    Very nice video Lewis

  • @ojasmittal8381
    @ojasmittal8381 11 месяцев назад +1

    This guy basically turned Discord's blog into an interesting video 10/10.

  • @nickhtt
    @nickhtt 4 месяца назад

    What a nice video. Thank you very much :)

  • @frogery
    @frogery 7 месяцев назад +1

    love the animations on these videos

  • @AnushR27
    @AnushR27 Год назад +3

    Great video Lewis 😃. Got to know so much information about Discord databases. Thankyou!

  • @roshangamage7749
    @roshangamage7749 Год назад +3

    Great video ❤

  • @nathan0401_
    @nathan0401_ Год назад

    This was very fascinating to watch

  • @AhmedMi1ad
    @AhmedMi1ad 10 месяцев назад

    Wow I really enjoyed the video, so insightful.

  • @ninjanape
    @ninjanape 11 месяцев назад

    Great video. Subbed.

  • @awsomevideoperson
    @awsomevideoperson 11 месяцев назад +4

    I wonder if the issue with the normal Cassandra is really the GC, or the memory pressure Java currently has due go reference types. I suspect user defined primitives and fibers will really make Java a stronger contender in the high performance space

  • @Tarodev
    @Tarodev 10 месяцев назад

    Great video!

  • @YosephTeki
    @YosephTeki Год назад

    wow very very insightfull !!! thanks for making this video

  • @-hackers_industry
    @-hackers_industry Год назад +7

    Could you do "A roadpath to become a software engineer" some time soon?

  • @po6577
    @po6577 Год назад

    this story are amazing, great motivation to improve myself!

  • @bajagainsatish4828
    @bajagainsatish4828 Год назад +2

    Awesome dude!!!

  • @mukithasan9684
    @mukithasan9684 11 месяцев назад

    Today i learned a lot about database management how behind the scenes work

  • @avonzo
    @avonzo 9 месяцев назад

    Great video. Great content. Thank you.

  • @bideshbanerjee5506
    @bideshbanerjee5506 Год назад +7

    I may be wrong but I heard from someone in a livestream that data service layer can be implemented in golang and the latency difference would still be unnoticeable

  • @simonkimel3339
    @simonkimel3339 Год назад +74

    This shows that Discord developers are really capable, yet the auto update on Linux doesn't work.

    • @Tudas
      @Tudas Год назад +30

      Because Linux is literally completely irrelevant, atleast on the consumer market.

    • @oh-noe
      @oh-noe Год назад

      @@Tudas lol so dumb

    • @lucass8119
      @lucass8119 11 месяцев назад +4

      @@Tudas You would think Discord, a company that relies on 100% of their own servers running Linux and is a consumer of open-source products like Apache Cassandra, would put just a tad more care into the linux version.

    • @Nitidus
      @Nitidus 11 месяцев назад +1

      ​@@TudasI mean, there's the Steam Deck now. It definitely has become a LOT less irrelevant compared to a couple of years ago.

    • @umaradam3788
      @umaradam3788 11 месяцев назад

      ​@@Tudaswhat are you talking about. The entire consumer market is reliant on Linux. Facts.

  • @tanmaypanadi1414
    @tanmaypanadi1414 10 месяцев назад

    the editing on this channel has exponenetially increased in quality 🤩

  • @Joshuahendrix
    @Joshuahendrix Год назад +2

    Really enjoyed this one ☝️

  • @MistaWu
    @MistaWu 8 месяцев назад

    That was cool… awesome breakdown…🔥🔥

  • @willmil1199
    @willmil1199 8 месяцев назад +1

    Love this channel

  • @musikSkool
    @musikSkool 6 месяцев назад +3

    Discord is the perfect combination of Twitter, Facebook, an in-game chat bar, and even Instagram. If you pay them a little you can even treat it like RUclips or Twitch.

  • @Terracronz
    @Terracronz Год назад

    Cool video, earned a sub

  • @sebobebo10
    @sebobebo10 Год назад +2

    I read the title and immediately thought, “I wonder how much storage space I can take up by just spamming emojis…”

  • @varshard0
    @varshard0 10 месяцев назад

    So informative and entertaining.

  • @MyNameIsSalo
    @MyNameIsSalo 4 месяца назад

    have never put much thought into discord but they really are at the peak of social media, almost 0 downtime ever and always provides a consistent streamlined experience. I can imagine that they will end up doing many many more database migrations in the future as discord dominates the social media space. Wonder if there will ever be a permanent solution of a database which is truely infinitely expandable.

  • @javadevelopment6551
    @javadevelopment6551 10 месяцев назад

    Great video, and I'm left with one question how to find and use the right tools at the right place and at the right time 😅
    That something comes with experience or any beginning can also master that?

  • @SusGus-rf8gm
    @SusGus-rf8gm Год назад +6

    A few years ago, I don't remember why exactly but I had issues my phone plan and I was stuck with worse than dial up speeds for a while. Im talking low kilobytes per second, maybe even bytes. Discord was literally the only "online" app that still worked pretty much normally (besides embeds). That thing is optimized to death

    • @harrywang4769
      @harrywang4769 10 месяцев назад +1

      yeah that's not it. the size of the data being sent and received has no correlation between how optimized the app is. your internet connection works for discord because the amount of data sent by discord is very small. it has nothing to do with app optimization.

  • @kumalalalalalalaa7045
    @kumalalalalalalaa7045 Год назад

    Love these videos

  • @broneverasked
    @broneverasked Год назад +3

    Lewis: *thinking he says NoSQL bad*
    Me: *says NoSquirrel*

  • @lisibethklair
    @lisibethklair 8 месяцев назад +1

    every time I think about discord I get a horrendously awkward flashback to my first situationship :/ when he asked “do u have discord” I replied “about you staying or about you leaving?” 💀

  • @farhan-momin
    @farhan-momin Год назад +1

    what a video! learning + entertainment

  • @zuman_one
    @zuman_one 5 месяцев назад

    Please Keep making such system design videos because I don’t like to read long articles 😂

  • @DemiImp
    @DemiImp Год назад +4

    You just altered the color of the rust logo. That is in violation of their trademark!!! 😂

  • @vanilla-plus
    @vanilla-plus 11 месяцев назад

    Interesting colour choice on the Coalesce... What an interesting hypothesis.

  • @itsjustsushi2023
    @itsjustsushi2023 Год назад +3

    This could've been the perfect video to advertise your dc

  • @TomWhi
    @TomWhi Год назад

    Interesting video. I feel sorry for that underused blackboard though… it looked like it was going to be written on about 5 times with not a single mark ever made on it!

  • @pemessh
    @pemessh Год назад +5

    Wow this is an awesome informative video.
    Please do keep them coming!!

  • @skiper7795
    @skiper7795 Год назад

    I love discord. Best comunicator out there

  • @youtubear2217
    @youtubear2217 Год назад +2

    "2017 was 6 years ago" nooooooo😭

  • @blackbriarmead1966
    @blackbriarmead1966 Год назад +12

    I love how you made the letters of coalescence alternate purple and yellow... like Moira's ultimate in Overwatch. This was intentional, right?

  • @Vergilenjoyer
    @Vergilenjoyer Год назад +1

    Subtitles: "Hi, my name is, and"
    Video: "Hi my name is Lewis"

  • @andixpiwi8325
    @andixpiwi8325 Год назад +6

    discord working their ass off just to allow me and my friends to write the dodgiest messages ever (we're on a government watchlist)

  • @orlovchik
    @orlovchik Год назад

    thanks for the video!!! the question was in my mind this morning and, what a great recommendation, you gave me a full answer! but I have one more question why discord mobile app is so laggy and slow, while its web and desktop versions works fine

  • @darpitrangari8207
    @darpitrangari8207 Год назад

    Can you go into a little more details as to why they were facing difficulties?

  • @404statuscode
    @404statuscode Год назад +14

    Make a video on how Google sheets can handle Sheets that are thousands of rows long without even the user noticing it. For example How it can load the data faster(even with my crappy internet). I know that they will be using compressions and things. But a video or a short would be nice explaining it.

    • @martinmc0950
      @martinmc0950 Год назад +7

      It’s just text. Your average RUclips video is harder to load

    • @Tudas
      @Tudas Год назад

      ​@@martinmc0950 It's not just text lmao, did you ever see Sheets that are fking huge? But Excel does that even better, NASA literally uses Excel for huge ass calculations.

    • @martinmc0950
      @martinmc0950 Год назад +8

      @@Tudas just because the sheets are big doesn’t mean it’s not text??? Although I see where you’re coming from with the whole calculation thing, using a computer for math is always going to be effective

  • @rkubapl
    @rkubapl 5 месяцев назад

    great video

  • @allezvenga7617
    @allezvenga7617 Год назад

    Thanks for your sharing

  • @27.Counting
    @27.Counting 11 месяцев назад

    I have a questuon ... If they had written the data services first , would they still migrate from cassandra ? Considering that daya services was their bigger improvement ?

  • @aze4308
    @aze4308 Год назад

    Great video.

  • @god_of_everything9644
    @god_of_everything9644 8 месяцев назад

    Got urself a sub sir

  • @vncntjms
    @vncntjms 6 месяцев назад +1

    "what any programmer would want to do when they see something new: changing architectures"
    I'm guilty.

  • @infinitelancer4612
    @infinitelancer4612 Год назад +11

    That's awesome

  • @Dahlah.FightMe
    @Dahlah.FightMe Год назад

    Nice Bro :D

  • @csabraxas
    @csabraxas Год назад +6

    I feel like you are trying to target newer programmers when you explain very simply concepts but then at the same time you gloss over extremely advanced concepts as if we understand them already. I'm not really learning much. I would love like a 5 part series of this whole thing in extreme detail. How does scaling work? How does spinning up clusters/nodes work, how are requests routed? How does GRPC work.

  • @uis246
    @uis246 8 месяцев назад

    9:10 during soviet era migrating entire buildings during night was a thing. And utilities(electricity, telephone, water, sewage) kept working.