Skip to content

Commit

Permalink
Updating traffic-control docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dvonlehman committed Mar 23, 2015
1 parent 5f58358 commit 7cf622c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/traffic-control.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,25 @@ Every time you deploy an Aerobatic app to the cloud a unique version id is
generated that can be appended to the base app URL to force that specific
version; bypassing the weighted random version selection process.
```
http://<app_name>.aerobaticapp.com?version=<unique_version_id>`
http://<app_name>.aerobaticapp.com?_version=<unique_version_id>`
```
When a request comes in with the `_version` parameter, a `_version` cookie is set and the browser is redirected to the same URL with the `_version` parameter stripped off. This allows the app to subsequently modify the search portion of the URL without having to worry about maintaining the `_version` (so manual page refreshes won't nuke the version override).

However once the redirect happens, there's no obvious way for the end user to know they are looking at a pre-release version of the app. You may want to modify the UI in some way (perhaps render a preview banner) if the current version was selected based on an explicit override. In this case the `__config__` [global variable](/docs/index-page#-__config__-global-variable) will have a `versionMethod` property with the value `"urlOverride"`.

~~~js
var __config__ = {
// bunch of other properties here
versionId: '123',
versionName: 'version 123',
versionMethod:'urlOverride' // or 'randomAssignment'
};
~~~

### Reset Override Version
In order to reset the URL override, direct the browser to `/?_version=reset`. This will cause the `_version` cookie to be cleared and a new version selected based on the traffic control rules. In the preview banner mentioned above, you may want to include a button or link for the end user to invoke this reset URL.

## Use Cases
The ability to access any version via URL, even if no live traffic is being directed
to it, opens up a number of streamlined workflows:

Expand Down

0 comments on commit 7cf622c

Please sign in to comment.