How LinkedIn improved their latency by 60%

Поделиться
HTML-код
  • Опубликовано: 27 июн 2024
  • System Design for SDE-2 and above: arpitbhayani.me/masterclass
    System Design for Beginners: arpitbhayani.me/sys-design
    Redis Internals: arpitbhayani.me/redis
    Build Your Own Redis / DNS / BitTorrent / SQLite - with CodeCrafters.
    Sign up and get 40% off - app.codecrafters.io/join?via=...
    Recommended videos and playlists
    If you liked this video, you will find the following videos and playlists helpful
    System Design: • PostgreSQL connection ...
    Designing Microservices: • Advantages of adopting...
    Database Engineering: • How nested loop, hash,...
    Concurrency In-depth: • How to write efficient...
    Research paper dissections: • The Google File System...
    Outage Dissections: • Dissecting GitHub Outa...
    Hash Table Internals: • Internal Structure of ...
    BitTorrent Internals: • Introduction to BitTor...
    Things you will find amusing
    Knowledge Base: arpitbhayani.me/knowledge-base
    Bookshelf: arpitbhayani.me/bookshelf
    Papershelf: arpitbhayani.me/papershelf
    Other socials
    I keep writing and sharing my practical experience and learnings every day, so if you resonate then follow along. I keep it no fluff.
    LinkedIn: / arpitbhayani
    Twitter: / arpit_bhayani
    Weekly Newsletter: arpit.substack.com
    Thank you for watching and supporting! it means a ton.
    I am on a mission to bring out the best engineering stories from around the world and make you all fall in
    love with engineering. If you resonate with this then follow along, I always keep it no-fluff.
  • НаукаНаука

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

  • @pratyushsinha3348
    @pratyushsinha3348 18 дней назад +12

    Quality of content is insane, I have read limitation of JSON but never understood it as I did now. Big Thanks

  • @NK-ju6ns
    @NK-ju6ns 17 дней назад +37

    It’s simple change but you make it sound like a rocket science.

    • @seggsfault
      @seggsfault 15 дней назад

      His channel is nothing but showing engineering blogs, bro has only opened his channel to sell "cohort" courses which takes 40+ k.
      And there people only learn shit. This guy cant even code and just builds redis and bloom filters.
      BC ko itna v nhi pata ki youtube pr b redis from scratch videos already hain.

    • @cooldudecs
      @cooldudecs 15 дней назад +3

      Most brilliant ideas aren’t huge changes but small incremental change

    • @SnehilCodes
      @SnehilCodes 13 дней назад +3

      Pareto principle states that 80% of the results comes from 20% of actions.

    • @thinkmath4270
      @thinkmath4270 8 дней назад +1

      :). nailed it with comment

    • @arungowda
      @arungowda 5 дней назад

      Yeah. Very Simple to copy. yes. But the engineering and thought behind?

  • @akashshirale1927
    @akashshirale1927 18 дней назад

    Thanksss a lot...Such quality content!!!

  • @raj_kundalia
    @raj_kundalia 5 дней назад

    Thank you for doing this!

  • @prathamkrishna3751
    @prathamkrishna3751 17 дней назад

    Hi Arpit! Lovely video. Got a question for you, wrt the above example - "123456789" is consuming 9 bytes, and apart from that transferring data through json is a few more additional bits including the colon etc. Protobuf being one way of improving efficiency, but i believe csv would perhaps also be more efficient than json? We can eliminate the use of inverted commas, keys. Just return values seperated by commas and at the client end regex remove the comma. What do you think of this?

  • @gagandhand8907
    @gagandhand8907 16 дней назад +1

    Amaing. I have one question to ask Will serilization and deserialization not add any latency as client library will get the request in serialize format it needs to be deserialized.

  • @saitrinathdubba
    @saitrinathdubba 18 дней назад +1

    Brilliantly explained !! just like protobuf, info is efficiently packed ;) Thanks a lot :)

  • @manikantapunnam1189
    @manikantapunnam1189 18 дней назад

    Quality content, thanks for this ❤

  • @user-ho4yz2fl3i
    @user-ho4yz2fl3i 12 дней назад

    does google protocol buffers also reduces huge json sizes to be stored in db like mongo where there is a standard limit of 16 mb?

  • @kumarsantosh7376
    @kumarsantosh7376 15 дней назад

    Hey Arpit Can you please share the document ? for a quick revision if needed in future

  • @yamashanmukhchandra636
    @yamashanmukhchandra636 13 дней назад

    Quality and Clarity❤‍🔥❤‍🔥

  • @iajaydandge
    @iajaydandge 18 дней назад +5

    Hi Arpit, thanks for informational video as always.
    I have read that protobuf are generally used in interservice communication and not browser facing APIs, because they don't provide significant improvements over JSON in javascript based environment. Am I right or wrong?

    • @AsliEngineering
      @AsliEngineering  18 дней назад +5

      Yes, but this is not due to JSON. We do not see a substantial improvement because the latency of transmitting network over the internet is so high that cost of serialisation is miniscule in front of it.
      Hence, spending a few extra cycles does not matter much and hence Protobufs are typically preferred for inter-service communication within the private infra/vpc.

    • @iajaydandge
      @iajaydandge 18 дней назад +1

      @@AsliEngineering Thank you

    • @Shris-jc6eu
      @Shris-jc6eu 17 дней назад

      Good learning

  • @rajyobro2078
    @rajyobro2078 18 дней назад +1

    Service mesh (istio/linkerd) solves this out of the box. Not to mention it’s language agnostic and decoupling service to service communication from app code. Library based framework is a thing of the past.

    • @SurendraKumar-tf2fc
      @SurendraKumar-tf2fc 18 дней назад +1

      As per my understanding, Service Mesh like Istio make sure the communication between services in such a way that it can be trackable. But, it doesn't reduce the response time and doesn't play any role in reducing the latency.
      LinkedIn might have not wanted to spin up more than the required pods for don't know how many appliations..😅
      To reduce the cloud cost, Organisation should also focus on the tech and library which they have been using at code level. We as a developer should not always rely on cloud infrastructure..🙂

    • @dew_reddit
      @dew_reddit 18 дней назад

      Marely managing & tracking traffic better doesn’t solve the performance problem.
      Also, linkedin is probably already using a properly configured service mesh.

  • @subee128
    @subee128 8 дней назад

    Thanks

  • @jatinnandwani6678
    @jatinnandwani6678 18 дней назад

    Superb

  • @1993rahulsharma
    @1993rahulsharma 6 дней назад

    Hey Arpit,
    Love the knowledge that you share.
    What device and app do you use for note taking?

  • @imhiteshgarg
    @imhiteshgarg 11 дней назад +1

    Thanks Arpit.
    So if i understood it correctly. We need to make changes at 2 places:
    Backend:
    Just before sending the response, convert the JSON to protobuf format.
    Frontend:
    Convert the protobuf back to JSON and then use it.
    Please let me know if my understanding is correct or not!

    • @AsliEngineering
      @AsliEngineering  6 дней назад +1

      This is done for microservices communication - so backend to backend. Frontend is not yet involved. Their frontend API still talks GraphQL.

  • @rajesh.singha
    @rajesh.singha 18 дней назад

    Good content

  • @jst_kishan
    @jst_kishan 18 дней назад +1

    You mentioned that one of the possible solutions could have been to compress the data and transmit. But isn't the data compressed by default with gzip in HTTP communication?

  • @umangbhate2774
    @umangbhate2774 9 дней назад

    I literally couldn't wrap my head around how they did the rollout ? Did the library just ensure if the necessary headers are present and transfer data in the correct format accordingly ?
    Did they query an endpoint to see the supported content types ?
    There SHOULD BE A SWITCH somewhere which decides on the client whether to send protobuf or json ? Or did they literally put this all in REST.li where client attempts with protobuf and on non support of content type, sends the request again in json ?

    • @RaZziaN1
      @RaZziaN1 2 дня назад

      Nope, seems like he's talking bollocks.
      In-between services you are using protobuff, and on client and main service or gateway you are using json, that's it, so it's standard grpc..

  • @armaansaini271
    @armaansaini271 18 дней назад

    How/Where do you find these information? These internal updates, and use cases by the companies? Is there any newsletter, website or channel or something?

    • @AsliEngineering
      @AsliEngineering  18 дней назад +2

      nope. I regularly go through company's engineering blogs and publications; and also conferences like VLDB, SIGMOD, and USENIX.

    • @armaansaini271
      @armaansaini271 17 дней назад

      @@AsliEngineering Thank you ✨

  • @yashagarwal8468
    @yashagarwal8468 16 дней назад +1

    I was trying to check the api calls that my client makes when i open linkedin and i was not able to find any calls with protobuf. I'm curious if they still havent rolled out this feature in India, any ideas?

    • @cooldudecs
      @cooldudecs 15 дней назад

      It is between services. Think of it as a service mesh upgrade. The transit between services are more impactful.

  • @akash-kumar737
    @akash-kumar737 18 дней назад

    Thanks 😊. Keep making such informative videos.

  • @nagesh007
    @nagesh007 18 дней назад +1

    Awesome 😍 , thanks for teaching

  • @nagesh007
    @nagesh007 18 дней назад

    Code Crafters Recommendation from you is awesome and Mind blowing😍 .... Thanks a lot bro

    • @AsliEngineering
      @AsliEngineering  18 дней назад +1

      Glad you are enjoying it :) nothing beats being hands-on.

    • @nagesh007
      @nagesh007 18 дней назад

      @@AsliEngineering ya

  • @tanaykmr
    @tanaykmr 18 дней назад

    A huge thank you for these videos sir!

  • @indianengineer5802
    @indianengineer5802 10 дней назад

    I believe they reduced response time rather than latency.

  • @ramannanda
    @ramannanda 14 дней назад

    Avro could also be used but yes json is slow and inefficient

  • @nirjalpaudel
    @nirjalpaudel 18 дней назад

    How do you find blogs like these and also papers

    • @AsliEngineering
      @AsliEngineering  18 дней назад

      I regularly go through company's engineering blogs and publications; and also conferences like VLDB, SIGMOD, and USENIX.

    • @seggsfault
      @seggsfault 15 дней назад

      Its just some clicks away 😂😂, Tu v thoda laptop uthale aur search kr le

  • @prashanthb6521
    @prashanthb6521 18 дней назад

    Its surprising they didnt do this earlier and were paying high cloud costs till now.

    • @xiaoshen194
      @xiaoshen194 18 дней назад +2

      They do excessive diversity hiring. No wonder…

  • @pratikmehta6207
    @pratikmehta6207 12 дней назад

    just think if all whole internet adopt this serialization and deserialization (33mbps will go to 80+mbps) xD

  • @imchiragkumar
    @imchiragkumar 18 дней назад +2

    kanha reduce hua h, pura lag karte rahta h linkedin

    • @AsliEngineering
      @AsliEngineering  18 дней назад +3

      If you look at their API calls, they are graphql based and have massive payloads. Takes a ton of time to transmit and process the data. So, still some scope for improvement.

  • @user-fc7th5rw1z
    @user-fc7th5rw1z 12 дней назад

    boss your talk gives heavy sleep. I don't have to have sleeping pills. 🤣

  • @pradeexsu
    @pradeexsu 14 дней назад

    bhaiya ne uper notes likh rakhe h 🙂

  • @abdulragib6004
    @abdulragib6004 15 дней назад +1

    Amazon prime migrate from Microservice to monolithic architecture

  • @snehil3209
    @snehil3209 18 дней назад

    Arpit you're true gem. You BILLIONS of subscribers ❤

  • @shubhamsehgal2336
    @shubhamsehgal2336 6 дней назад

    it still s'ucks

  • @vishusingh008
    @vishusingh008 18 дней назад

    BC ye video ke hisab latency kam ho gae hai, aur actual app me latency is all time high. The difference between theory and actual user experience 😅

  • @chobblegobbler6671
    @chobblegobbler6671 18 дней назад +6

    Enough bro.. stop

    • @suryanshsingh6906
      @suryanshsingh6906 18 дней назад +9

      Why

    • @user-ur2en1zq4f
      @user-ur2en1zq4f 18 дней назад

      Watch hentai, don't come here

    • @addiegupta
      @addiegupta 16 дней назад +1

      Tf. Go watch something else

    • @seggsfault
      @seggsfault 15 дней назад

      ​​@@addiegupta. Just because you are an average software fan doesnt mean everyone has to. His channel is nothing but only showing engineering blogs with his iPad.
      No coding and nothing. No wonder he was kicked out from Google, this guys can't code shit.