Reverse Proxy vs API Gateway vs Load Balancer

Поделиться
HTML-код
  • Опубликовано: 13 июн 2024
  • Get a Free System Design PDF with 158 pages by subscribing to our weekly newsletter: bit.ly/bytebytegoytTopic
    Animation tools: Adobe Illustrator and After Effects.
    Checkout our bestselling System Design Interview books:
    Volume 1: amzn.to/3Ou7gkd
    Volume 2: amzn.to/3HqGozy
    The digital version of System Design Interview books: bit.ly/3mlDSk9
    ABOUT US:
    Covering topics and trends in large-scale system design, from the authors of the best-selling System Design Interview series.
  • НаукаНаука

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

  • @MrAnshulji
    @MrAnshulji 3 месяца назад +136

    My understanding is that a reverse proxy is a generic service sitting between clients and servers, effectively hiding the server's address. On top of it, if this service can also balance load across different servers, then it becomes a load balancer. On top of this, adding features like auth, monitoring and API management, you get an API gateway.
    So essentially an API gateway can also act as a load balancer and reverse proxy. For example, Kong, an API gateway, is built on top of nginx, a reverse proxy.

    • @iCrimzon
      @iCrimzon 3 месяца назад +18

      So an API gateway without API management and auth is just a load balancer and a load balancer without needing to balance loads to multiple servers is just a proxy server which hides the servers address? How fun

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

      @@iCrimzon sarcasm? You can ask these questions to chatgpt btw and it will give you detailed answers.

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

      @@MrAnshulji are you trolling? i could ask but you already explained it and im just making sense of it, why would i ask GPT, if you could ask GPT then why are you watching the video

    • @punpompur
      @punpompur 3 месяца назад +4

      That's probably the simplest explanation I have seen so far.

    • @24381498
      @24381498 2 месяца назад +2

      You have explained better than the video itself. thanks.

  • @shauvikr
    @shauvikr 2 месяца назад +19

    The most interesting thing in this video is the responsibilities, which was quickly mentioned but I think it deserves to be in the schematic. While all the items send requests to a particular backend server, they are responsible for the following:
    - Reverse proxy - security (hide identity of backend service/endpoint), load distribution, SSL termination, compression & caching.
    - API gateway - single point of entry for a collection of micro-services (different APIs/RPCs), routing requests, Authn/Authz, Monitoring & rate-limiting
    - Load balancer - high availability & reliability by scaling a single service dynamically (up/down) depending on traffic, Implement routing algos - round robin/least connections/ip hash
    The part that I think most people are confused normally is considering a system (e.g., NginX) and considering that it's only a reverse proxy. The video does a great job explaining that it may serve as both Reverse proxy as well as Load balancer.

    • @ravindranaths513
      @ravindranaths513 Месяц назад

      Do we have any thing, which combines all these three?

  • @saitaro
    @saitaro 3 месяца назад +13

    I dropped all the programming subscriptions except for this one. You guys are making some really good explanations. Please go on.

  • @TanaseLiviu
    @TanaseLiviu 3 месяца назад

    Wonderful explained ! Kudos

  • @user-bi9sd6ly8h
    @user-bi9sd6ly8h 2 месяца назад +1

    You made amazing work! Thank you

  • @SoftwareLevelUp
    @SoftwareLevelUp 2 месяца назад +1

    Your animations are great! Do you do it all yourself or hire out for it?

  • @fritzfahrmann4730
    @fritzfahrmann4730 3 месяца назад +5

    Nginx can also route different routes to other services -> see usage as ingress in k8s

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

    Thanks

  • @sesburg
    @sesburg 23 дня назад +1

    I learned that the three concepts here are not mutually exclusive ideas. Rather, they refer to the different roles of a server placed between the client and the application server(s). Reverse proxy is the name of this server that sits between the client and app servers, acting as the "face." API gateway handles the correct use and distribution of API requests. Load balancer means this server is managing many app servers by monitoring their health and availability. Learning something new today.

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

      if by many app servers you mean many instances of the same application web server, yes; if you meant multiple apps, then I think that would be handled by the API Gateway. Thanks for writing your thoughts here! It helps better understand the topic through others' views!

  • @samjones4327
    @samjones4327 3 месяца назад

    Thank you for yet another great and informative tutorial! I absolutely love your content and please keep it coming for as long as possible! Be well, be safe and Cheers!!

  • @raj_kundalia
    @raj_kundalia 2 месяца назад

    Thank you!

  • @mdIrfan40
    @mdIrfan40 2 месяца назад +1

    I watch ByteByteGo video frequently i impressed with graphics, also read book High level system design, i am very curios to know how you made this graphics ?

  • @tototrapsilo
    @tototrapsilo 3 месяца назад +7

    Isn't API Gateway a reverse proxy too? Yes, usually API Gateway comes with more features such as auth, rate limiting, etc. But, fundamentally, API Gateway is a reverse proxy, right?

    • @gssathvik
      @gssathvik 2 месяца назад

      Yes. Thats right. With reverse proxy you can configure the routing logic which helps with routing the requests to the specific service or resource.

  • @superanik1
    @superanik1 3 месяца назад +2

    How do we make presentations like these?
    Are these created via PowerPoint or any other tool?

  • @Xaoticex
    @Xaoticex 3 месяца назад

    finally one of the better designed videos

  • @Tony-dp1rl
    @Tony-dp1rl 3 месяца назад

    Been years since I have seen a new project use nginx, as the Azure and AWS SaaS offerings provide the same features - or better in some cases.

  • @MdIrfan-ip9be
    @MdIrfan-ip9be 3 месяца назад +6

    Which software do you use for making animated slides?

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

      It could be python animation.. not sure how the library is called though. Saw someone else mentioning this

  • @RajKumar-nz5ru
    @RajKumar-nz5ru 3 месяца назад +7

    Adding Ingress controller aswell which is reverse proxy of kubernetes universe

  • @trihahuy3653
    @trihahuy3653 Месяц назад

    hello sir, Can you help me know what software help you made a interesting animation like that.

  • @ColinRichardson
    @ColinRichardson 3 месяца назад +4

    I wrote my own reverse proxy in javascript..
    It's not as feature rich as nginx, but it does what I need it to do..
    I still want to implement websockets correctly, but that is Future Colin's problem.

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

      Repo?

    • @ColinRichardson
      @ColinRichardson 3 месяца назад

      @@brunodearaujoalves698 to RUclips keeps deleting the reply

    • @ColinRichardson
      @ColinRichardson 3 месяца назад

      @@brunodearaujoalves698 RUclips is even deleting comments of me saying it's deleting my comments

    • @ColinRichardson
      @ColinRichardson 29 дней назад

      @@brunodearaujoalves698 not a public one. It has all its settings wrote directly into the JavaScript currently. Some settings such as simple forwarding will be easy to serialise.
      But others I wrote some simple endpoint functions directly off the proxy instead of spinning up another server.
      Not exactly best practice. But it's working well enough for now.

  • @humanvegetable
    @humanvegetable 3 месяца назад

    Big brain

  • @the_god_killah
    @the_god_killah 27 дней назад

    so those three does the same thing (being in the middle) but they are called different names based on the services/task that they do

  • @leetkhan
    @leetkhan 2 месяца назад +2

    They all are same, the name dictates where is it used.
    LB is generally provided by Service provider.
    Reverse proxy is a server that you install and manage.
    API gateway is just fancy LB with more control over headers and http configs. It generally paired with serverless functions etc etc

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

      thanks for mentioning this! However it is not clear why "the name dictates where it is used" from your explanation

  • @TotoAstro77
    @TotoAstro77 3 месяца назад +4

    In my mind :
    - Reverse proxy forward requests to the right server according to the hostname in the request
    - API gateway forward requests to the right server according to the path of the request
    - Load balancer forward requests to the right server according to criterias of the server (aliveness, latency, requests previously sent, ...)

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

      An API gateway is a reverse proxy that also handles auth and rate limiting. A reverse proxy can forward requests based on path or hostname.

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

    I've never been this early to a video 🧐

  • @ArpitThukral
    @ArpitThukral 2 месяца назад

    I thought vs would mean highlighting the differences, meaning how one is better useful than other.

  • @gus473
    @gus473 3 месяца назад

    400th Like (at two hours)! 😎✌️

  • @bloodraven9622
    @bloodraven9622 3 месяца назад

    Thank you for great explanation, but I still misderstading in terminology "Reverse" is it because of callback ? May I call this service just a proxy?

    • @renarsdilevka6573
      @renarsdilevka6573 3 месяца назад +4

      Reverse proxy is close to the server side whereas the term "proxy" can be used in the context of proxying the request on the client side instead.

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

      You can think in terms of a forward proxy vs reverse prox. For standard http calls, the forward direction is from the client to the server. So a proxy sitting in the "forward" direction is a forward proxy and the one sitting in the "reverse" direction is a reverse proxy.

    • @modestas2890
      @modestas2890 2 месяца назад

      client => proxy => reverse proxy => server

  • @davidlee588
    @davidlee588 3 месяца назад +62

    still don't see their difference from here

    • @RockyTheDog756
      @RockyTheDog756 3 месяца назад +7

      Agree, only surface explanation, which work only for those who know the answer

    • @MattBowler
      @MattBowler 3 месяца назад +14

      They are fundamentally the same. API gateways are just specific functionality layered on top of a proxy architecture.
      Source: I am an engineer for F5, owners of Nginx, BIG-IP, and F5 Distributed Cloud edge services.

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

      ​@@MattBowler pasting a comment below from another comment thread on this video
      "So an api gateway without api management and auth is just a load balancer, and a load balancer without needing to balance loads to multiple servers is just a proxy server which hides server address"
      Does this statement summarize the actual difference between those 3? Also, i have a question about API gateway. So far I have used nginx only as a reverse proxy in a server where I host multiple applications. Api management and authentication is handled on an application level. If I ever plan to use an API gateway, does it mean I can remove the authentication logic from each application and add it to the API gateway, essentially making the applications just API endpoints?

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

      @@punpompur, that statement is reasonable and summarizes the three well.
      Regarding using an API gateway as a means to decouple auth from an application, this is often seen as an advantage. Pushing your security features and functionality away from the core application code allows developers to focus on what they're delivering for the business. Imparting security controls such as auth and WAF at the API gateway layer allows much more control and flexibility when it comes to lifecycle management and ops.

    • @punpompur
      @punpompur 3 месяца назад

      @@MattBowler what if there are multiple applications in a server where I plan to use API gateway and each application may have its own way of implementing authentication logic? Can I customize the API gateway in such a way that it can encompass all the different types of authentication logic before I remove it from the application code, or there will be only a single way of authentication inside the API gateway?

  • @saketshetty
    @saketshetty 2 месяца назад

    Can someone explain in 2:28 how can all 3 servers use same port

    • @0xluiisss
      @0xluiisss 2 месяца назад

      Different IPs

    • @nadirabbas2k
      @nadirabbas2k 29 дней назад

      The ports are local to each server/docker container.

  • @da40au40
    @da40au40 2 месяца назад

    Fun fact, A Reverse proxy is a load balancer and still an API gateway😅😅.
    Depending on how its built tho

  • @s8x.
    @s8x. 2 дня назад

    they are all technically the same thing😂