API Account Orchestration
Overview
API Account Orchestration, which can be also called Account Load Balancing helps optimize performance by distributing the API calls among multiple accounts, reducing the load on each individual account. This can prevent performance bottlenecks and ensure that each API account operates within its capacity limits, resulting in improved response times and better overall performance for your application.
Configuration
global:
remedies:
- name: Global API Account Orchestration
enabled: true
config:
account_orchestration:
round_robin:
- <account_identifier1>
- <account_identifier2>
accounts:
<account_identifier1>: # This can be any string, but it must be unique
tokens:
- header:
name: <header_name>
value: <header_value1>
<account_identifier2>: # This can be any string, but it must be unique
tokens:
- header:
name: <header_name>
value: <header_value2>
The following configuration options are available for this remediation plugin:
Parameter | Example Value | Possible Values | Description |
---|---|---|---|
Load Balancing Method | round_robin | Only round_robin is supported at this time | The load balancing method to use. |
round_robin | [account1, account2, account3] | List of accounts defined in the accounts section | The list of accounts to use for the round robin orchestration method. |
The accounts section is required for this plugin to work. It is used to define the accounts that will be used for the account orchestration method. The following configuration options are available for the accounts section:
Parameter | Example Value | Possible Values | Description |
---|---|---|---|
account_identifier | account1 | Any string | The identifier for the account. This can be any string, but it must be unique. |
tokens | List of tokens | List of tokens | The list of tokens to use for the account. |
header | Header name and value | Any header name and value | The header to use to authenticate with the API provider. |
name | Authorization | Any header name | The name of the header to use to authenticate with the API provider. |
value | Bearer 123 | Any header value | The value of the header to use to authenticate with the API provider. |
Example
endpoints:
- url: api.com/resource/{id}
method: GET
remedies:
- name: api.com API Account Orchestration
enabled: true
config:
account_orchestration:
round_robin:
- aliceb@comp.io
- johnf@comp.io
- bobc@comp.io
accounts:
aliceb@comp.io:
tokens:
- header:
name: Authorization
value: Bearer 123
johnf@comp.io:
tokens:
- header:
name: Authorization
value: Bearer 456
bobc@comp.io:
tokens:
- header:
name: Authorization
value: Bearer 789
Why use the API Accounts Orchestration plugin?
-
Scalability: By distributing the API calls across multiple API accounts, you can handle a higher volume of requests and achieve better scalability. Load balancing allows you to leverage the resources of multiple API accounts simultaneously, enabling your application to handle increased traffic without overburdening a single account.
-
Redundancy and Fault Tolerance: Load balancing provides redundancy and fault tolerance by allowing you to distribute the workload across multiple API accounts. If one API account becomes unavailable or experiences issues, the load balancer ensures continuous service availability and minimizes the impact of failures.
-
Rate Limit Management: Load balancing helps manage rate limits imposed by the API provider. By distributing the requests across multiple accounts, you can distribute the API calls within the rate limits of each individual account. This prevents exceeding the rate limits on a single account, which could lead to throttling or rejection of requests.
This feature is relevant only for stateless API providers, where there’s an option to create multiple accounts, consuming the same API provider, and thus increasing the overall API provider’s quota and the user’s systems consumption capacity.