Pry Deployment ๐ข
Production notesโ
- Resource budget: ~512 MB idle, spikes to 1-2 GB per concurrent Chromium worker. Set worker concurrency to match available RAM.
- Rate limiting is your responsibility toward target sites: configure global
RPS + per-domain politeness delays. Scrape responsibly; respect
robots.txtwhere you've agreed to. - Keep Pry off public search-engine radars: it's a tool API, not a website.
Bind behind your reverse proxy with auth (
Authorization: Bearer <token>).
location / {
proxy_pass http://127.0.0.1:8080;
proxy_read_timeout 90s;
client_max_body_size 10m;
}
Scalingโ
Horizontal: run N API containers behind nginx round-robin; share Redis so the
strategy cache is fleet-wide. Vertical: more Chromium workers per container via
PRY_CONCURRENCY.