Application Level Throttling in WSO2 Microgateway with WSO2 API Manager

Eg: https://localhost:9443/admin
Admin Console home page — WSO2 API Manager 3.2.0
Application Policies section — WSO2 API Manager 3.2.0
Add Application Policy Popup -WSO2 API Manager 3.2.0
5 Requests per 1 Minute application policy
2 Requests per 1 Minute application policy
Eg: https://localhost:9443/publisher
API Create selection — WSO2 API Manager 3.2.0
API Overview — WSO2 API Manager 3.2.0
Endpoints — WSO2 API Manager 3.2.0
Business Plans — WSO2 API Manager 3.2.0
API Lifecycle — WSO2 API Manager 3.2.0
micro-gw init <project_name>Eg: micro-gw init TEST_API_PROJECT
Microgateway init project — WSO2 Microgateway Toolkit 3.2.0
micro-gw import -a <API_name> -v <version> <project_name>Eg: micro-gw import -a TEST_API -v 1.0.0 TEST_API_PROJECT
Import API from Publisher to Microgateway Toolkit — WSO2 Microgateway Toolkit 3.2.0
micro-gw build <project_name>Eg: micro-gw build TEST_API_PROJECT
Build Microgateway project — WSO2 Microgateway Toolkit 3.2.0
[throttlingConfig]
enabledGlobalTMEventPublishing=true
jmsConnectionProviderUrl = “amqp://admin:admin@carbon/carbon?brokerlist=’tcp://localhost:5672'”
[throttlingConfig.binary]
enabled = true
username = “admin”
password = “admin”
[[throttlingConfig.binary.URLGroup]]
receiverURL = “tcp://localhost:9611”
authURL = “ssl://localhost:9711”
[apim.eventHub]
enable = true
serviceUrl = “
https://localhost:9443"
internalDataContext=”/internal/data/v1/”
username=”admin”
password=”admin”
eventListeningEndpoints = “amqp://admin:admin@carbon/carbon?brokerlist=’tcp://localhost:5672'”
gateway <PATH_TO_JAR_FILE>/<RUNTIME_ARTIFACT_NAME>.jarEg: gateway /home/sumudu/TEST_API_PROJECT/target/TEST_API_PROJECT.jar
Running the runtime artifact - WSO2 Microgateway Runtime 3.2.1
Eg: https://localhost:9443/devportal
Application with 2ReqPerMin throttling policy — WSO2 API Manager 3.2.0
Application with 5ReqPerMin throttling policy — WSO2 API Manager 3.2.0
API Subscription in Application — WSO2 API Manager 3.2.0
Subscribing an API — WSO2 API Manager 3.2.0
curl -k -X POST https://localhost:8243/token -d "grant_type=password&username=Username&password=Password" -H "Authorization: Basic Base64(consumer-key:consumer-secret)"Eg: curl -k -X POST https://localhost:8243/token -d "grant_type=password&username=admin&password=admin" -H "Authorization: Basic elllTkM0U0VNN3h2cFp0VEt2RE1QRXhHbW1rYTpUbUhGRlBvc2w2NUl1Qnh2XzU3Q1p5ZnZabmNh"
Generate access token — WSO2 API Manager 3.2.0
Success Response
Throttled Out Response
Throttled Out Response

--

--

--

Senior Software Engineer @ WSO2 | 2nd Runner-Up of WSO2 Certified Employee of the Year — 2021 | 10X WSO2 Certified | BIT(UCSC) | DiHN | OCPJP

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Grocery App Development: Cost and Features

Guide to WSL

Tips on applying for a Software Engineer position

Screen Scraping for Real-time Poker Data.

Labelbox and Diffgram

Mamba Development News

Tester’s Ten Commandments

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sumudu Sahan Weerasuriya

Sumudu Sahan Weerasuriya

Senior Software Engineer @ WSO2 | 2nd Runner-Up of WSO2 Certified Employee of the Year — 2021 | 10X WSO2 Certified | BIT(UCSC) | DiHN | OCPJP

More from Medium

Build the Event Driven Application using Async API make it consistent using Cloud Event.

Setup Basic MySQL Master-Slave Replication

Document API using docgen

PostgreSQL System Architecture