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

Kong Gateway 入門編-101

Wenhan Shi
February 24, 2022

Kong Gateway 入門編-101

101 - Services, Routes, Plugins & Consumers

Wenhan Shi

February 24, 2022
Tweet

More Decks by Wenhan Shi

Other Decks in Technology

Transcript

  1. THE CLOUD CONNECTIVITY COMPANY
    1
    © Kong Inc.
    THE CLOUD
    CONNECTIVITY COMPANY
    Kong Gateway 入門編
    101 - Services, Routes, Plugins & Consumers
    施文翰(Wenhan Shi) – Solution Engineer
    FEBRUARY 2022

    View full-size slide

  2. THE CLOUD CONNECTIVITY COMPANY
    2
    © Kong Inc.
    Who Am I ?
    施 文翰(シ ブンカン) Wenhan Shi
    日立製作所 - Linux カーネルモジュールの保守開発
    Red Hat K.K. - GlusterFS/OpenShift サポート
    Canonical Japan K.K. - Ubuntu/OpenStack/Kubernetes サポート
    Rancher Lab/SUSE - Rancher及び周辺製品のサポート
    Kong Inc. - ソリューションエンジニア(プリセールス)
    @shi_wenhan
    [email protected]

    View full-size slide

  3. THE CLOUD CONNECTIVITY COMPANY
    3
    © Kong Inc.
    - API & Kong Gateway Intro
    - Deployment Intro
    - Service & Route
    - Plugins
    - Consumer
    Agenda

    View full-size slide

  4. THE CLOUD CONNECTIVITY COMPANY
    4
    © Kong Inc. 4
    API & Kong Gateway

    View full-size slide

  5. THE CLOUD CONNECTIVITY COMPANY
    5
    © Kong Inc. 5
    API(Application Programming Interface)
    Slack API
    Twitter API v2 Pagerduty APIs Spotify APIs
    Google Places API Dropbox API

    View full-size slide

  6. THE CLOUD CONNECTIVITY COMPANY
    6
    © Kong Inc.
    API Client
    User
    App
    Service
    6
    API use case Example
    • 気象情報API by Yahoo!Japan
    https://developer.yahoo.co.jp/webapi/map/openlocalplatform/v1/weather.html
    気象情報
    API

    View full-size slide

  7. THE CLOUD CONNECTIVITY COMPANY
    7
    © Kong Inc. 7
    Behind the API
    API Client
    User
    App
    Service
    Application
    本番業務
    認証認可
    セキュリティ
    ログ・監視
    負荷分散
    Req/Res変換
    ・・・
    API

    View full-size slide

  8. THE CLOUD CONNECTIVITY COMPANY
    8
    © Kong Inc. 8
    Behind the API
    API Client
    User
    App
    Service
    KONG GATEWAY
    Authentication
    Monitoring
    Logging
    Security
    ACL
    Caching
    Rate-Limiting
    Serverless
    plugins
    Application
    本番業務

    View full-size slide

  9. THE CLOUD CONNECTIVITY COMPANY
    9
    © Kong Inc. 9
    Kong Gateway Deploy Intro

    View full-size slide

  10. THE CLOUD CONNECTIVITY COMPANY
    10
    © Kong Inc. 10
    Install Kong Gatewat
    https://docs.konghq.com/gateway/2.7.x/install-and-run/

    View full-size slide

  11. THE CLOUD CONNECTIVITY COMPANY
    11
    © Kong Inc. 11
    Kong Gateway Mode
    https://docs.konghq.com/gateway/

    View full-size slide

  12. THE CLOUD CONNECTIVITY COMPANY
    12
    © Kong Inc. 12
    Kong Gateway Configuration Path
    • Admin API :
    RESTful Interface for configuration
    Default 8001 port
    • Kong Manager :
    GUI Interface for configuration
    Default 8002 port

    View full-size slide

  13. THE CLOUD CONNECTIVITY COMPANY
    13
    © Kong Inc. 13
    Service & Route

    View full-size slide

  14. THE CLOUD CONNECTIVITY COMPANY
    14
    © Kong Inc. 14
    Kong gatewayの中で、外部API/URLやmicroserviceを代表するもの
    Service
    External API
    KONG GATEWAY
    MIcroservice
    Service
    Service
    Service URL 1
    LB
    URL 2

    View full-size slide

  15. THE CLOUD CONNECTIVITY COMPANY
    15
    © Kong Inc. 15
    Serviceにrequestが送信される方法(および送信可否)を決定
    Route
    External API
    KONG GATEWAY
    MIcroservice
    Service
    Service
    Service URL 1
    LB
    URL 2
    API Client
    Route
    Route
    Route

    View full-size slide

  16. THE CLOUD CONNECTIVITY COMPANY
    16
    © Kong Inc. 16
    Demo – Service / Route

    View full-size slide

  17. THE CLOUD CONNECTIVITY COMPANY
    17
    © Kong Inc. 17
    Demo - Service / Route
    http://httpbin.org/anything
    KONG GATEWAY
    Service
    Service
    API Client Route(ping)
    Route(xml)
    Route(json)
    /xml
    /json
    http://httpbin.org/

    View full-size slide

  18. THE CLOUD CONNECTIVITY COMPANY
    18
    © Kong Inc. 18
    Plugins

    View full-size slide

  19. THE CLOUD CONNECTIVITY COMPANY
    19
    © Kong Inc. 19
    Kong Plugin Hub

    View full-size slide

  20. THE CLOUD CONNECTIVITY COMPANY
    20
    © Kong Inc. 20
    Kong Plugin Coverage
    KONG GATEWAY
    Service
    Service
    Service LB
    Route
    Route
    Route
    Global Level
    Resource level
    Resource level
    Resource level

    View full-size slide

  21. THE CLOUD CONNECTIVITY COMPANY
    21
    © Kong Inc. 21
    ■ 総当たり攻撃を防止
    ■ High costのCallを制限
    ■ 頻繁なウェブスクレイピングを防止
    ■ Clientのレベル分け
    単位時間内アクセス可能数を制限
    Rate Limiting / Rate Limiting Advanced

    View full-size slide

  22. THE CLOUD CONNECTIVITY COMPANY
    22
    © Kong Inc. 22
    ■ メモリ・Redisによるパフォー
    マンス改善
    ■ サーバーリソースの節約
    パフォーマンス改善
    Proxy Caching / Proxy Caching (advanced)

    View full-size slide

  23. THE CLOUD CONNECTIVITY COMPANY
    23
    © Kong Inc. 23
    ■ 認証なしのアクセスを禁止
    アクセス認証
    Key Authentication

    View full-size slide

  24. THE CLOUD CONNECTIVITY COMPANY
    24
    © Kong Inc. 24
    Consumer

    View full-size slide

  25. THE CLOUD CONNECTIVITY COMPANY
    25
    © Kong Inc. 25
    Route/serviceにアクセスするend user / clientに関連付けられ、
    アクセス管理、ポリシーの適用、アクセス監視/追跡が可能
    Consumer
    External API
    KONG GATEWAY
    MIcroservice
    Service
    Service
    Service URL 1
    LB
    URL 2
    API Client
    Route
    Route
    Route
    Consumer
    Consumer
    Consumer
    API Client

    View full-size slide

  26. THE CLOUD CONNECTIVITY COMPANY
    26
    © Kong Inc. 26
    Demo – Consumer

    View full-size slide

  27. THE CLOUD CONNECTIVITY COMPANY
    27
    © Kong Inc. 27
    Resources
    • Documentation - https://docs.konghq.com/
    • Community - https://discuss.konghq.com/
    • Github - https://github.com/Kong/
    • Kong Academy - https://education.konghq.com/
    • Quick Start - https://docs.konghq.com/gateway/2.7.x/get-started/quickstart/

    View full-size slide

  28. THE CLOUD CONNECTIVITY COMPANY
    28
    © Kong Inc.
    Thank You
    ご不明点、案件のご相談などございましたら
    [email protected]
    までご連絡ください

    View full-size slide