Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ocelot Pluggable Gateway

Ocelot Pluggable Gateway

Ocelot is a pluggable gateway that you could install on top of ASP.net core project. This presentation presents a basic use-case of API gateways and how Ocelot is a perfect API Gateway for financial organizations.

Allan Chua

May 12, 2019
Tweet

More Decks by Allan Chua

Other Decks in Technology

Transcript

  1. Allan A. Chua
    Pluggable API Gateway
    OCELOT
    https://bit.ly/2HmVKq1

    View Slide

  2. Use Cases
    0
    0
    0
    0
    ___
    Cautions
    Agenda

    View Slide

  3. View Slide

  4. View Slide

  5. Products
    API
    Customers
    API
    Transactions
    API
    Orders
    API
    Deliveries
    API
    Microservices
    Monolith
    Application

    View Slide

  6. Products
    API
    Customers
    API
    Transactions
    API
    Orders
    API
    Deliveries
    API
    Microservices Expectation

    View Slide

  7. Products
    API
    Customers
    API
    Transactions
    API
    Consumers face a lot of challenges
    Orders
    API
    Deliveries
    API
    o
    X X
    ___

    View Slide

  8. Multiple Retrieval
    + Attack Points
    0
    0
    0
    0
    ___
    Multiple Domain
    Names, SSL Certs
    and CORS
    http://foo.com
    http://bar.com
    http://ses.com
    Authentication
    Hell
    Client-side Issues

    View Slide

  9. Products
    API
    Authentication
    Rate Limiting
    Logging
    Orders
    API
    Authentication
    Rate Limiting
    Caching
    Transactions
    API
    Authentication
    Logging
    Caching
    Clients / Consumers
    Inconsistencies and Duplications

    View Slide

  10. To solve these,
    API Gateways are
    introduced

    View Slide

  11. Products
    API
    Customers
    API
    Transactions
    API
    Orders
    API
    Deliveries
    API
    Stocks
    API
    API Gateway
    API Gateway to the Rescue

    View Slide

  12. Do you mean a
    Reverse Proxy?

    View Slide

  13. Proxying is one of the jobs of a gateway.
    API Gateway
    Authentication
    Rate Limiting
    Logging
    Reverse Proxy
    Caching
    Monitoring Tracing Authorization
    Authorization

    View Slide

  14. Centralized Cross Cutting Concerns
    API Gateway
    - Logging
    - Authentication
    - Rate Limiting / QOS
    - Licensing
    - Monitoring
    - Tracing

    View Slide

  15. Faster Cross-
    continental calls
    due to Response
    Aggregation

    View Slide

  16. ASIA Europe
    Cost of Communication 55 MS
    Latency
    SSL Handshake

    View Slide

  17. Consumer
    ASIA Europe
    Products
    Transactions
    Users
    Latency of 55 MS
    55 MS x 3 = 165 MS
    Total Response Time
    W/O Gateway

    View Slide

  18. Consumer API Gateway
    ASIA Europe
    Products
    Transactions
    Users
    Latency of 55 MS
    Latency of 2 MS
    With Gateway
    Asia to EU = 55 MS
    EU to EU = 2 MS x 3 instances
    TOTAL Response Time = 61 MS

    View Slide

  19. Public / Private APIs
    API Gateway
    Orders API Stocks API Products API
    A C
    B A B A B
    PUBLIC
    PRIVATE
    Jobs
    E
    D C
    D C
    D

    View Slide

  20. Ocelot API Gateway
    - Designed for .NET Core
    - ASP.net Core Add-on
    Install-Package Ocelot
    https://bit.ly/2JptJBR

    View Slide

  21. Advantages of using Ocelot
    - Open source (Free)
    - Flexible
    - On-Premise
    - Cloud
    - Compliance Friendly
    - Easy to Migrate

    View Slide

  22. Feature Packed
    - Reverse Proxy
    - Response Aggregation
    - Service Discovery
    - Consul
    - Eureka
    - Kubernetes
    - Authentication / Authorization
    - Rate Limiting
    - Caching
    - QOS via Polly
    - Logging
    - Tracing

    View Slide

  23. Integrations with

    View Slide

  24. Docker Compose Demo
    API Gateway
    Products
    Users
    Transactions
    https://bit.ly/30e98Fx

    View Slide

  25. Downsides
    - No enterprise support
    - Framework lock-in
    - No API management

    View Slide

  26. Links
    - (API Gateway Comparables) - https://bit.ly/2KU1YCL
    - (API Gateway in a Nutshell) - https://bit.ly/2O4IbAU
    - (Ocelot Compose Demo) - https://bit.ly/30e98Fx
    - (Ocelot Documentation) - https://bit.ly/2KpUBCI
    - (Speaker Deck) - https://bit.ly/2HmVKq1

    View Slide