Reverse Proxy vs API Gateway vs Load Balancer

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 มิ.ย. 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.
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @MrAnshulji
    @MrAnshulji 2 หลายเดือนก่อน +131

    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 2 หลายเดือนก่อน +17

      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 2 หลายเดือนก่อน +1

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

    • @iCrimzon
      @iCrimzon 2 หลายเดือนก่อน +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 2 หลายเดือนก่อน +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 หลายเดือนก่อน +17

    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 2 หลายเดือนก่อน +13

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

  • @user-bi9sd6ly8h
    @user-bi9sd6ly8h 2 หลายเดือนก่อน +1

    You made amazing work! Thank you

  • @sesburg
    @sesburg 15 วันที่ผ่านมา +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 3 วันที่ผ่านมา

      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!

  • @fritzfahrmann4730
    @fritzfahrmann4730 2 หลายเดือนก่อน +5

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

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

    Wonderful explained ! Kudos

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

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

  • @mdIrfan40
    @mdIrfan40 หลายเดือนก่อน +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 ?

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

    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!!

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

    Thanks

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

    Thank you!

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

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

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

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

  • @Tony-dp1rl
    @Tony-dp1rl 2 หลายเดือนก่อน

    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 2 หลายเดือนก่อน +6

    Which software do you use for making animated slides?

    • @munteanionut3993
      @munteanionut3993 3 วันที่ผ่านมา

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

  • @tototrapsilo
    @tototrapsilo 2 หลายเดือนก่อน +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.

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

    finally one of the better designed videos

  • @RajKumar-nz5ru
    @RajKumar-nz5ru 2 หลายเดือนก่อน +7

    Adding Ingress controller aswell which is reverse proxy of kubernetes universe

  • @the_god_killah
    @the_god_killah 19 วันที่ผ่านมา

    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

  • @TotoAstro77
    @TotoAstro77 2 หลายเดือนก่อน +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 5 วันที่ผ่านมา

      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.

  • @ColinRichardson
    @ColinRichardson 2 หลายเดือนก่อน +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 2 หลายเดือนก่อน +1

      Repo?

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

      @@brunodearaujoalves698 to TH-cam keeps deleting the reply

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

      @@brunodearaujoalves698 TH-cam is even deleting comments of me saying it's deleting my comments

    • @ColinRichardson
      @ColinRichardson 21 วันที่ผ่านมา

      @@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.

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

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

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

    Big brain

  • @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 3 วันที่ผ่านมา

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

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

    I've never been this early to a video 🧐

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

    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 2 หลายเดือนก่อน +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 2 หลายเดือนก่อน +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

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

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

    • @0xluiisss
      @0xluiisss 2 หลายเดือนก่อน

      Different IPs

    • @nadirabbas2k
      @nadirabbas2k 22 วันที่ผ่านมา

      The ports are local to each server/docker container.

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

    all of these things are reverse proxies. api gateway is also a reverse proxy by definition, just with advanced functionality. also reverse proxy can and often is layer 7 load balancer , as well as reverse proxy. third example is layer 4 load balancer, but all of these can be reverse proxies or load balancers, it depends on architecture of application and context or perspective from which you are looking at the component, this video is not very accurate.

  • @davidlee588
    @davidlee588 2 หลายเดือนก่อน +61

    still don't see their difference from here

    • @RockyTheDog756
      @RockyTheDog756 2 หลายเดือนก่อน +6

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

    • @MattBowler
      @MattBowler 2 หลายเดือนก่อน +12

      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 2 หลายเดือนก่อน +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 2 หลายเดือนก่อน +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 2 หลายเดือนก่อน

      @@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?

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

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

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

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