...
Remaining data is expected to be per-Region(including projects, global config, resource limits) and not shared across databases in other Regions.
New Tables
Table | Columns | |
|---|
region
| id name end_point api_key secret_key
| Integer - Unique Id of the Region. Number regions are expected to be small, hence using integer instead of long Name of the Region. Should be unique. Region end_point. e.g http://10.147.30.11:8080/client api_key of the admin user secret_key of the admin user |
region_sync | id region_id api created processed | |
Changes to existing tables
...
- When creating the account, it is created first in the Region that the user is logged into
- Account table will include region_id column, indicating the Region that it is created from
- This Region is responsible for propagation of Account creation to other Regions
- Admin user api_key/secret_key are used to make API calls to peer regions. api_key/secret_key are provided while adding the Region.
- Account deletion/modification is always forwarded to the Region that originally created the account
- The Region that originally created account is responsible for deleting the account from all of the regions. If it cannot reach an Region, an entry is created in the region_sync table with api details.
...