...
Create Account
Create Account A1 in Region1 (Region Id 1). Propagate Publish account creation to all the remaining Regions. An entry will be added to region_sync table if account creation API fails in any region. Source event. Source Region Id for A1 will be 1. External Id(UUID) for the Account should be same in all Regions. Account DB Ids could be different for each Region. Update Account (update/disable/enable Account)
Account update actions are forwarded to the source Region. After source Region is successfully updated, account update event is propagated to the remaining Regionspublished. Account update fails if the source Region cannot be updated or is unavailable. Delete Account
Delete Account is forwarded to the source Region. After account is successfully deleted in the source Region, delete event is propagated to the other Regionspublished. Account delete fails if the delete in source Region fails or is unavailable. - Login to Region A and move to Region B without providing credentialsSimilarly for users and domains.
...
Table | Columns | Description |
|---|
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 Auto incremented | | id Id of the region for whom the API call failed API command and params. e.g command=createAccount&username=a3&password=a3&firstname=a3&lastname=a3&email=dsf%40dsf.com&account=a3&accounttype=0&domainid=1&accountid=68f952dc-69e6-458c-80c7-a3f3911cb9cc&userid=37817353-fed2-4963-b8ca-eaf2c4c9d744®ionid=1 created time stamp Processed flag. Default 0. |
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 Regionspublished account creation event
- Account deletion/modification is always forwarded to the Region that originally created the account
- 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.
The same applies for Domains and Users.
Create: For any resource created in Region A, MS is Region A will send API requests to peer Regions publish an event along with external Id of the resource. API requests are sent to the peer Regions using the end_point of each Region
Update/Remove: Request is forwarded to the source region. After updating the resource locally, source region sends API requests to peer regions with ispropogate flag set to true.If any sync API call made by source region fails,an entry will be added to region_sync table with API details. The operation itself won't fail provided the changes were successfully applied locally
Event framework
Events are published using the event framework. Cloud operator is expected to implement consumers for these events and apply the changes in the peer regions.
Authentication
Once logged in User should be able to switch from one Region to another without providing credentials again
...
- createAccount
- New parameters
- accountid : UUID of the account
- userid: UUID for the User
- regionid: Id of the source Region where Account creation request was initiated
- deleteAccount, updateAccount, disableAccount, enableAccount
- New parameter
- ispropagate: Boolean flag which indicated if the API call is being propagated from another Region
- createUser
- userid: UUID for the User.
- regionid: Id of the source Region where User creation request was initiated
deleteUser/updateUser/disableUser/enableUser/lockUser - ispropagate: Boolean flag which indicated if the API call is being propagated from another Region
- createDomain
- New parameters
- domainid: UUID for the Domain
- regionid: Id of the source Region where Domain creation request was initiated
- deleteDomain/updateDomain ispropagate: Boolean flag which indicated if the API call is being propagated from another Region
Limitations
1. Since all update/delete operations are forwarded to the source region (i.e the region where the resource was initially created), if the source region is down, these operations will fail2. Any failure to sync API calls will be logged in region_sync table. It will be the responsibility of the cloud operator to propagate these changes offline.
Upgrade
During upgrade, flexibility will be provided to move existing zones into any Region.
...