Project

General

Profile

Actions

Idea #1885

closed

Keep proxy service: forward external requests to the appropriate keep servers

Added by Tom Clegg over 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Story points:
3.0

Description

Useful for external and federated clients.

Necessary:
  • Use API host and token provided in environment variables to get the list of Keep servers at startup.
  • Use node selection algorithm (see Python SDK) to select probe order when reading and writing.
  • Forward Authorization header to Keep servers.
  • PUT:
    • use 2x replication, i.e., write to 2 Keep servers (future: client specifies this in a header)
    • in response headers, say "X-Data-Replication: 2"
  • GET:
    • 405 if --no-GET flag was given.
    • For now: do not implement GET. Do not even start up unless --no-GET flag is given.
  • GET /index*:
    • 403
Important but not strictly a blocker:
  • PUT: verify Authorization header by requesting /users/current from apiserver, respond 401 if not valid.
Nice to have:
  • Periodically request the latest list of Keep servers. (This has an easy workaround: TERM the server as needed.)
  • HEAD:
    • 405 if --no-HEAD flag was given, otherwise forward to Keep servers in probe order until it succeeds, send first successful response (or last failure, if none) to client
Implementation
  • Probably best to do this with Go. Perhaps something like https://github.com/elazarl/goproxy or even plain net/http. (But definitely as a separate project, not by adding "proxy mode" to the Keep server itself.)

Subtasks 4 (0 open4 closed)

Task #2797: Write proxy testsResolvedPeter Amstutz05/08/2014Actions
Task #2796: Write proxy server sideResolvedPeter Amstutz05/08/2014Actions
Task #2775: Decide what infrastructure to build proxy service onResolvedPeter Amstutz05/08/2014Actions
Task #2852: Review 1885-keep-proxyResolvedWard Vandewege05/08/2014Actions
Actions

Also available in: Atom PDF