Implementing API Gateway With Ocelot in ASP.NET Core

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ต.ค. 2024
  • ►► Master Web API development Best Practices: bit.ly/3TnqoFQ
    ►► Build great web apps in Blazor WebAssembly: bit.ly/437g87T
    ►► Support us on Patreon and get the source code: / codemaze
    Hi everyone. My name is Marinko Spasojevic and in this video, I will talk about creating an API gateway for your microservices in ASP.NET Core.
    An API Gateway acts as a mediator between client applications and the backend services within the microservices architecture. It is a software layer that functions as a single endpoint for various APIs performing tasks such as request composition, routing, and protocol translation.
    To be able to create the gateway project, I will use Ocelot. Ocelot is an open-source API Gateway, designed for microservices architecture, and in this video, you will see how it makes the process of creating an API gateway so easy. Also, I will show you how we can cache results and implement Rate limiting using Ocelot.
    LINKS MENTIONED IN THE VIDEO
    ►► Secure Microservices Using JWT With Ocelot - • Secure Microservices U...
    FOLLOW US ON SOCIAL MEDIA!
    ►► / marinko-spasojevic
    ►► / codemazeblog
    ►► / codemazeblog

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

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

    Thank you all for watching and for your support.
    ►► If you want to master Web API development using best practices, check out our Web API book: bit.ly/3x75ZMM
    ►► Also, to build great full-stack apps with Blazor, check out our course: bit.ly/3Pw3Y33

  • @biradarsm
    @biradarsm 2 วันที่ผ่านมา +1

    I just tried it, It worked like a charm. Super great video

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

      Great to hear! Thank you for watching the video.

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

    Ocelot looks promising in API Gateway and MS Patterns. Thanks Code Maze to bring this up!

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

      You are very welcome. Yes, it is a great tool for MS.

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

    amazing video men was the only one which helped me to set up everything approperly

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

      I am glad to hear that. Thank you for watching the video. There is also one regarding authentication with Ocelot if you want to give it a try. Feedback is always appreciated.

  • @sprtybi
    @sprtybi 15 วันที่ผ่านมา

    Wow . thanks❤

    • @CodeMaze
      @CodeMaze  15 วันที่ผ่านมา +1

      You're welcome. Thank you for watching this one.

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

    Thank you for touch this topic. It would be great if could explore service discovery concept.

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

      Thank you for watching the video and the suggestion, it is a great one.

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

    Excellent article! If the destination API has security (jwt token), how is the configuration in Ocelot to send the token in the header or does it automatically forward the received headers? Thank you!

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

      To be honest, I wouldn't do it that way because you have to repeat the same logic for each microservices project that you want to protect. But if you have it in that one, you will probably have a separate endpoint for auth, and the ocelot part is the same. You just need to change the upstream part to target a proper URI and provide the proper auth configuration. In the next video that comes out tomorrow, you will see how I handle the auth with Ocelot and Microservices.

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

      @@CodeMaze We are currently using Keycloak and the entire OIDC configuration in the APIs and frontends. I want to implement an ApiGateway, and I wanted to see what the security configuration would be like. Thank you very much for the reply.

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

      You are very welcome. I hope the next video provided some useful info for you.

  • @pieceofcode_
    @pieceofcode_ 24 วันที่ผ่านมา

    How to setup this communication in containerization in localhost. I want to setup gateway and functional microservice in localhost. I'm using docker compose for deploying multiple container.

    • @CodeMaze
      @CodeMaze  23 วันที่ผ่านมา

      We're going to publish a new course on Microservices very soon. This is a complex topic and hard to answer in a single comment or thread. If you want to, you can register at courses.code-maze.com and wait for the announcement of the course (est. 2-3 weeks). We're going to talk about it on the channel, in one of the future videos as well as well.

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

    gracias :)

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

      You are very welcome.

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

    please where is the link to the video where you added authentication?

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

      Hi. This video was recorded before the auth one, so I didn't link it in the description. But you can find both in the same playlist: th-cam.com/play/PLkOmPTFOxKBrtoebJJIiPVuCFIWuTLBvr.html
      That said, I will add the link to that video in the description now.

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

    Wasn't Ocelot Deprecated ?

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

      Not that I know. It is widely used, and based on this: www.nuget.org/packages/Ocelot the new versin was released a month ago.