Environment ยท Production
Production
The live platform real customers use at travel.padi.com. It runs on two AWS servers in the us-west-2 region, backed by managed databases, cache, search and storage. Everything on this page is Production only.
Summary
At a glance
- Live domainstravel ยท business ยท intranet ยท affiliates ยท extranet .padi.com
- Region
us-west-2(Oregon), AWS account441054594441 - Web server
i-00c3563dac78c97ccยท54.214.11.210ยท runs the app + Nginx - Jobs server
i-00fa9eb40442ebf69ยท54.203.134.44ยท runs Celery workers - Main databaseAWS Aurora PostgreSQL cluster (writer + read replica)
- DeploysManual: SSH in, pull
stable, migrate, restart (see Deployments)
The picture
How it fits together
Read this top to bottom, like descending through water: visitors arrive at the surface, requests pass through the edge, into the servers, and down to the data at the bottom. Colours show where each piece runs.
What talks to what
The same picture as a list of connections โ handy when tracing where a request or a job actually goes.
| From | To | What flows |
|---|---|---|
| Browser / mobile | Cloudflare โ Nginx | Page & API requests for travel.padi.com |
| Browser | CloudFront โ S3 | Images, CSS, JS (static & media) |
| Nginx | Gunicorn / Node SSR | Routes each site to the right app process |
| Gunicorn (app) | Aurora writer | Reads & writes (bookings, products, accounts) |
| Gunicorn (app) | Aurora reader | Partner API reads only (keeps load off the writer) |
| Gunicorn (app) | Web-server Redis | Sessions, cache, cached queries |
| Gunicorn (app) | Elasticsearch | Search & autosuggest |
| Gunicorn (app) | ElastiCache | Queues background jobs |
| ElastiCache | Celery workers | Workers pick up queued jobs |
| Celery workers | Aurora, S3, outside services | Emails, payments follow-up, syncs, indexing |
| Web server (cron) | S3 backups/logs | Nightly database, Redis & log archives |
Detailed reference diagram
The full production connection map from the architecture reference โ every service and how it connects (scroll sideways to see it all).
Server 1 of 2
The web server
- Instance
i-00c3563dac78c97ccยท54.214.11.210ยท us-west-2a - Size
m5a.8xlargedrift the infrastructure code says 4xlarge โ it was resized by hand
Running directly on the server native
| Service | Address | What it does |
|---|---|---|
| Nginx | :80 / :443 | The front door. Handles HTTPS and routes 5 sites (travel, business, intranet, affiliates, extranet) to the right app process. |
| Gunicorn “padi” | 127.0.0.1:7000 | The main app. 48 worker processes โ handles the bulk of requests. |
| Gunicorn “long” | 127.0.0.1:6000 | For slow requests โ exports and the Django admin. 2 workers, longer timeout. |
| Gunicorn “crawler” prod-only | 127.0.0.1:8000 | A separate pool just for search-engine bots, so crawlers don’t slow real users. Set up by hand on this server only. |
| travel_next | :3003 | Server-side rendering for the new consumer site (Next.js). |
| travel_ssr | :3001 | Server-side rendering for the older consumer site. |
| extranet_ssr noted | port to confirm | Server-side rendering for the operator portal (often missed in older docs). |
| Static sites | via Nginx | Pre-built site files served straight from disk (travel-app, intranet, affiliates…). |
Containers on this server 5 containers
| Container | Port | What it holds / does | Status |
|---|---|---|---|
| Redis redis:7.0 | 6379 | Sessions, cached queries (cacheops) and the app cache. This is the app-cache home. | Active |
| Elasticsearch 8.12.2 | 9201โ9200 | The real search engine โ autosuggest and listing search. | Active |
| Kibana | 5601 | A UI for Elasticsearch. | unused |
| Prometheus | โ | Metrics collection (leftover). | unused |
| node-exporter | โ | Server metrics for Prometheus (leftover). | unused |
04:10 โ Nginx logs to s3://logs-for-diviac ยท 04:15 โ Redis dumps to s3://backups-for-diviac/redis ยท 04:20 โ database dumps to s3://backups-for-diviac/database. App logs also stream live to AWS CloudWatch.
Server 2 of 2
The background-jobs server
- Instance
i-00fa9eb40442ebf69ยท54.203.134.44ยท us-west-2a - Size
r6a.xlarge(memory-optimised)
Running directly on the server native
| Service | What it does |
|---|---|
| Celery: high / mid / low | Three worker groups by priority โ urgent, normal, and batch jobs. |
| Celery: crowdin | A dedicated worker for translation sync, kept separate so it can’t slow down bookings. |
| Celery beat | The scheduler โ fires ~35 recurring jobs (price recalcs every 10 min, hourly charges, daily syncs). |
| Flower (:5555) | A dashboard to watch the workers (internal only). |
The job queue lives in AWS, not here
The queue that connects the two servers is AWS ElastiCache (a managed Redis). The web server puts jobs on it; this server takes them off. There is also a Redis container running on this jobs server, but its exact role is not confirmed โ the queue itself is ElastiCache.
The queue (broker) is ElastiCache. Cached-query state is pointed at the web server’s Redis. What this server’s own Redis container serves hasn’t been confirmed on the box โ treat it as an open question rather than assuming.
AWS ยท databases
Databases AWS
Production uses an Aurora PostgreSQL cluster โ a managed database with one main copy (the writer) and a read-only copy (the reader) for partner traffic. A separate small database holds AI translations.
| Database | Size | Holds |
|---|---|---|
| Aurora writer padi-travel-covid19-aurora | db.r7g.4xlarge | The main database โ all bookings, products, accounts, prices. Handles all writes and most reads. |
| Aurora reader โฆ-aurora-r1 | db.r7g.large | A read-only copy. Used only by the partner API, to keep their traffic off the main database. |
| RDS translations padi-travel-ai-translations | db.t4g.micro | Results & feedback from an AI-translation experiment (German only). Separate from the main cluster. |
Which part of the app uses which database
| App connection | Goes to | Notes |
|---|---|---|
default | Aurora writer | Normal reads & writes |
long | Aurora writer | Slow/export queries (longer timeout) |
replica | Aurora reader | Partner API reads only |
translations | RDS translations | AI translation data |
Price & availability calculations are the heaviest load on the database. One known query (activity pricing search) can push the main database to 100% CPU. Recurring price recalculations run every 10 minutes.
AWS + container
Caching & Redis
There are two Redis homes, and they do different jobs. Mixing them up is the classic mistake here.
AWS ElastiCache
The job queue โ the channel between the web server and the jobs server. Holds the queue (broker) and job results.
prod-padi-travel-elastic-cache
Redis container (web server)
The app cache โ login sessions, cached database queries, and the general cache. This lives in the container on the web server.
Think: queue = AWS ยท app cache = web-server container.
Two engines
Search
Elasticsearch (container)
The real search engine โ autosuggest, location lookup, listing search. Runs as a container on the web server. There is no managed AWS search service for this.
OpenSearch (AWS)
Despite the name, this is not used for search โ it’s a fast read-only store that speeds up a few heavy pages (the Dive Shop Locator). Production domain: padi-travel-dsl, 3 nodes across zones.
AWS ยท storage
Files & storage AWS
Uploaded images, generated files, and site assets live in AWS S3 buckets. CloudFront (a CDN) serves the public ones quickly to visitors.
| Bucket | Holds |
|---|---|
s-diviac-com | Public images, media & static site files. Served via CloudFront. |
s-padi-travel-private | Private files (access-controlled). |
padi-travel-export-prod | Data exports for the Dive Shop Locator & shop integrations. |
backups-for-diviac | Nightly database & Redis backups. |
logs-for-diviac | Archived Nginx logs. |
CloudFront distribution d2p1cf6997m1ir.cloudfront.net serves /static and /media from s-diviac-com.
AWS ยท Lambda
Serverless functions AWS
A few small functions run outside the main app (AWS Lambda), mostly to serve fast read-only pages from OpenSearch and to power the partner API.
| Function | What it does | Reads from |
|---|---|---|
| Dive-site listing | Serves the dive-site list quickly | OpenSearch |
| Course locator | Serves the course finder | OpenSearch + database |
| Partner shop list / status | Shop data & visibility for resellers | Database |
| Partner authorizer | Checks partner API tokens | Database |
How these (and the servers) are provisioned with AWS CDK is covered on the Deployments page.
Outside services
Outside services SaaS
The platform relies on several third-party services over the internet:
There’s also a message queue (AWS SQS, the Google-reviews queue) and a cross-account EventBridge bus in the separate “core prod” account (388221456699) โ discovered from code at src/diviac/settings/production.py:253 (AWS_TRANSLATION_BUS). See Two AWS accounts on the Overview.
Be aware
Production notes & risks
| Item | Detail |
|---|---|
| Server size drift drift | The web server runs m5a.8xlarge live, but the infrastructure code says m5a.4xlarge. Re-running that code could shrink production โ reconcile it first. |
| Deployed by hand | No automated production deploy; two servers updated manually. See the production runbook. |
| Crawler pool is hand-managed | The bot-traffic pool exists only here and isn’t part of the automated setup โ it can quietly break on a server rebuild. |
| Unused containers | Kibana, Prometheus and node-exporter run but do nothing useful. |
| Jobs-server Redis to confirm | The role of the Redis container on the jobs server is unconfirmed. |