Skip to content

[WIP] Add the Ability to use Redis for Storage #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 15 commits into from
Closed
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,26 @@ first part of the URL path, e.g.:
"/otherdomain.biz": "http://10.0.1.4:5555",
}
```

## Using External Storage
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: I'll have more detail after Min and Kyle's reviews.

## Route table and external storage (optional)

With the default configuration,  configurable-http-proxy (CHP) places the route table in the local process' memory.

If you would like to use external storage for the route table, i.e. redis, memcached, mysql, and others, you may specify an executable to use external storage. You would:


By default CHP uses memory in the local process for storing the route table. If you'd prefer to use an external storage
mechanism, like redis, memcached, mysql, etc. You can specify an executable to be used instead, by passing the path to
your script in the `--storage-command` option.

To do this, you'll need to ensure that the script is both accessible on the path and executable. The script should
support the following API, where `<path>` is the incoming request path and `<base64_json>` is a base64 encoded JSON
object.

```
$ /path/to/script get <path>
$ /path/to/script get_all
$ /path/to/script add <path> <base64_json>
$ /path/to/script update <path> <base64_json>
$ /path/to/script remove <path>
$ /path/to/script exists <path>
```

For an example, check out [the script] we use for testing this functionality.

[the script]: https://github.com/jupyterhub/configurable-http-proxy/blob/master/test/support/external_store