Skip to content

Public lightweight ephemeral key-value HTTP server for peer discovery, bootstrapping distributed applications, mesh networks, etc.

License

Notifications You must be signed in to change notification settings

Jipok/rendezvous

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rendezvous Key-Value Server

A lightweight, public key-value store server designed as a rendezvous/bootstrap point for mesh networks, distributed applications, and general-purpose key-value storage without registration.

🌐 Publicly Hosted Instance

Public instance is available at: https://rendezvous.jipok.ru

  • Key limit: 100 bytes
  • Value limit: 1000 bytes
  • Rate limit: 17 tokens per minute (get=1, set/los/cas/casoc = 3)
  • Expire time: 2 hours (configurable, per-entry TTL)
  • Max entries: 100,000

🚀 API Usage

⚡ All requests include the header:

  • X-Client-Ip — your detected public IP

Retrieve a Value

curl https://rendezvous.jipok.ru/get/your-key

If the key exists, server returns the stored value with an additional header:

  • X-Expires-At — Unix timestamp when key will expire

Store or Update a Value

curl -X POST -d "your-data-here" https://rendezvous.jipok.ru/set/your-key
  • Updates existing value (if not protected by secret)
  • Or creates a new key-value pair
  • Query parameter ttl can be provided (e.g. ?ttl=30m). If omitted, defaults to max (2h). TTL will be capped at expireDuration.

Example:

curl -X POST -d "session-token-123" "https://rendezvous.jipok.ru/set/my-key?ttl=30m"

Load Or Store (Atomic Get-Or-Create)

curl -X POST -d "initial-value" https://rendezvous.jipok.ru/los/unique-key

Behavior:

  • If key does not exist, it gets created with your value (OK returned).
  • If key already exists, server replies with its current value instead (does not overwrite).

Compare-And-Swap (CAS)

Useful for safe concurrent updates.

curl -X POST -d "new-value" \
     -H "X-Expected-Value: old-value" \
     https://rendezvous.jipok.ru/cas/some-key
  • Operation succeeds only if current value matches X-Expected-Value.
  • On mismatch, server returns the existing value with HTTP 409 Conflict.

Compare-And-Swap Or Create (CASOC)

Atomic variant that allows creation when key doesn’t exist:

curl -X POST -d "my-value" \
     -H "X-Expected-Value: old-value" \
     https://rendezvous.jipok.ru/casoc/my-key
  • If key does not exist, it is created.
  • If key exists but value differs, returns existing value (409).

Protecting Values with Owner Secret

To prevent unauthorized modification, attach X-Owner-Secret header when writing:

# Store with protection
curl -X POST -d "protected-data" \
     -H "X-Owner-Secret: my-secret" \
     https://rendezvous.jipok.ru/set/secure-key
  • Only requests with the same secret can update the value
  • New keys without secret can be "claimed" by adding a secret in the first update
  • Size of value + secret must not exceed the configured value limit (1000 bytes default)

IP-Protected Keys

Keys under /set/ip/ and friends will be automatically prefixed with your public IP.

Example:

# Store something under your IP namespace
curl -X POST -d "my server instance" https://rendezvous.jipok.ru/set/ip/service1

# Set on IP=20.18.12.10 → Actual key = ip/20.18.12.10/service1
# Response body will be OK, and your public IP will be available in the header X-Client-Ip.

Retrieve:

curl https://rendezvous.jipok.ru/get/ip/20.18.12.10/service1

This ensures only that IP can update ip/... keys.


📋 Use Cases

  • Peer Discovery: Initial peer bootstrap
  • Configuration Distribution: Share small configs
  • Ephemeral Data Exchange: Temporary messages or secrets
  • IoT Coordination: Lightweight communication channel
  • Secure Self-Identification: Publish info under IP-protected keys

🔧 Self-hosted

Using prebuilt

wget https://github.com/Jipok/rendezvous/releases/latest/download/rendezvous-server
chmod +x rendezvous-server
./rendezvous-server

Using Go

git clone https://github.com/Jipok/rendezvous
cd rendezvous
go build
./rendezvous-server

🔑 Features

  • No Registration — just use it
  • Simple HTTP API — minimal HTTP GET/POST interface
  • TTL Support — configurable expiration per key
  • Value Protection — optional secret protection
  • Ephemeral Storage — keys expire automatically
  • Rate Limited — tokens per-IP
  • Zero Dependencies — no external DB, just one binary

⚙️ Configuration Options

Flag Default Description
-maxKeySize 100 Maximum key length in bytes
-maxValueSize 1000 Maximum value length in bytes (including secret)
-maxNumKV 100000 Maximum number of key-value pairs
-expireDuration 2h Maximum/default TTL per key
-resetDuration 1m Time between rate limit resets
-saveDuration 30m Interval between periodic persistence saves
-maxRequests 17 Max tokens per IP per window (SET=3, GET=1)
-port 80 Server listening port
-l 0.0.0.0 Listen address (interface)
-disableLocalIPWarning false Disable warnings for requests from localhost

Example:

./rendezvous-server -maxValueSize 4096 -expireDuration 24h -port 9000

⚠️ Limitations

  • No Encryption — use HTTPS/TLS for security
  • IPv4 Only — rate limiting and IP-protected ops work only with IPv4

About

Public lightweight ephemeral key-value HTTP server for peer discovery, bootstrapping distributed applications, mesh networks, etc.

Topics

Resources

License

Stars

Watchers

Forks