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.

2EC2 servers (web + background jobs)
AuroraPostgreSQL cluster: writer + reader
5Docker containers on the web server
manualDeployed by hand (no rollback)

Summary

At a glance

  • Live domainstravel ยท business ยท intranet ยท affiliates ยท extranet .padi.com
  • Regionus-west-2 (Oregon), AWS account 441054594441
  • Web serveri-00c3563dac78c97cc ยท 54.214.11.210 ยท runs the app + Nginx
  • Jobs serveri-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.

AWS service On the server Container Outside service

What talks to what

The same picture as a list of connections โ€” handy when tracing where a request or a job actually goes.

FromToWhat flows
Browser / mobileCloudflare โ†’ NginxPage & API requests for travel.padi.com
BrowserCloudFront โ†’ S3Images, CSS, JS (static & media)
NginxGunicorn / Node SSRRoutes each site to the right app process
Gunicorn (app)Aurora writerReads & writes (bookings, products, accounts)
Gunicorn (app)Aurora readerPartner API reads only (keeps load off the writer)
Gunicorn (app)Web-server RedisSessions, cache, cached queries
Gunicorn (app)ElasticsearchSearch & autosuggest
Gunicorn (app)ElastiCacheQueues background jobs
ElastiCacheCelery workersWorkers pick up queued jobs
Celery workersAurora, S3, outside servicesEmails, payments follow-up, syncs, indexing
Web server (cron)S3 backups/logsNightly 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).

100%Zoom, or open full screen, then scroll to explore. Vector diagram โ€” stays sharp at any size.
flowchart TB user(["User browser"]) mobile(["Mobile app โ€” travel-rn<br/>/api/mobile/v1/"]) cf["๐ŸŒ Cloudflare<br/>(travel.padi.com HTML/API only)"] cdn["๐ŸŸง CloudFront<br/>d2p1cf6997m1ir.cloudfront.net<br/>(static + media)"] subgraph VPC["๐ŸŸง AWS us-west-2 VPC (vpc-6aa37213)"] direction TB subgraph WEB["EC2 Web โ€” i-00c3563dac78c97cc (m5a.8xlarge โš ๏ธ)"] direction TB subgraph WSD["๐ŸŸฆ systemd (native)"] ng["Nginx ยท 5 vhosts"] gpadi["Gunicorn padi :7000 (48w)"] glong["Gunicorn long :6000 (2w)"] gcrawl["Gunicorn crawler :8000 (1w)"] tnext["travel_next :3003"] tssr["travel_ssr :3001"] spas["Static SPAs (dist/)"] end subgraph WDK["๐ŸŸฉ docker (5)"] rloc[("Redis 7.0<br/>db2/3/5")] eslocal[("Elasticsearch 8.12.2<br/>:9201โ†’9200")] kib["Kibana โš ๏ธ"] prom["Prometheus + node-exporter โš ๏ธ"] end end subgraph CEL["EC2 Celery โ€” i-00fa9eb40442ebf69 (r6a.xlarge)"] cwk["๐ŸŸฆ padi_celery high/mid/low/crowdin<br/>+ beat + flower :5555"] crd[("๐ŸŸฉ Redis 7.0 (local) โ“")] end ec[("๐ŸŸง ElastiCache Redis<br/>prod-padi-travel-elastic-cache<br/>db0 broker ยท db1 results")] subgraph AUR["๐ŸŸง Aurora cluster โ€” padi-travel-covid19"] aw[("Writer r7g.4xlarge<br/>default + long")] ar[("Reader r1 r7g.large<br/>replica (partner API)")] end ait[("๐ŸŸง RDS padi-travel-ai-translations<br/>translations alias")] os[("๐ŸŸง OpenSearch padi-travel-dsl<br/>DSL read-store")] subgraph LAM["๐ŸŸง Lambdas + API Gateway"] ldsl["diveSiteListing / courseLocator"] ldist["distributor shop/status/authorizer"] end subgraph S3["๐ŸŸง S3"] s3m[("s-diviac-com<br/>media ยท static")] s3p[("s-padi-travel-private")] s3e[("padi-travel-export-prod")] s3b[("backups-for-diviac")] s3l[("logs-for-diviac")] end cwl[("๐ŸŸง CloudWatch Logs")] end saas["๐ŸŒ Stripe ยท Cognito ยท Hyperwallet<br/>Salesforce ยท Mailchimp ยท Crowdin<br/>Firebase FCM ยท Sentry"] user -- HTML/API --> cf --> ng user -- assets --> cdn --> s3m user -- "business/intranet/affiliate/extranet" --> ng mobile --> cf ng --> gpadi & glong & gcrawl & tnext & tssr & spas gpadi --> rloc gpadi --> aw gpadi -. replica .-> ar gpadi --> ait gpadi --> eslocal gpadi --> s3m & s3p & s3e gpadi -- enqueue --> ec gpadi --> saas ec -- dequeue --> cwk cwk --> aw & ait & eslocal & s3m & saas cwk --> crd gpadi -. sync .-> os cwk -. sync .-> os ldsl --> os ldsl --> aw ldist --> aw WEB -. cron 04:10/04:15/04:20 .-> s3b & s3l WEB --> cwl CEL --> cwl

Server 1 of 2

The web server

In plain terms: this is the machine that answers every website request. It runs the app, the web server, and a few helper containers.
  • Instancei-00c3563dac78c97cc ยท 54.214.11.210 ยท us-west-2a
  • Sizem5a.8xlarge  drift  the infrastructure code says 4xlarge โ€” it was resized by hand

Running directly on the server native

ServiceAddressWhat it does
Nginx:80 / :443The front door. Handles HTTPS and routes 5 sites (travel, business, intranet, affiliates, extranet) to the right app process.
Gunicorn “padi”127.0.0.1:7000The main app. 48 worker processes โ€” handles the bulk of requests.
Gunicorn “long”127.0.0.1:6000For slow requests โ€” exports and the Django admin. 2 workers, longer timeout.
Gunicorn “crawler” prod-only127.0.0.1:8000A separate pool just for search-engine bots, so crawlers don’t slow real users. Set up by hand on this server only.
travel_next:3003Server-side rendering for the new consumer site (Next.js).
travel_ssr:3001Server-side rendering for the older consumer site.
extranet_ssr notedport to confirmServer-side rendering for the operator portal (often missed in older docs).
Static sitesvia NginxPre-built site files served straight from disk (travel-app, intranet, affiliates…).

Containers on this server 5 containers

ContainerPortWhat it holds / doesStatus
Redis redis:7.06379Sessions, cached queries (cacheops) and the app cache. This is the app-cache home.Active
Elasticsearch 8.12.29201โ†’9200The real search engine โ€” autosuggest and listing search.Active
Kibana5601A UI for Elasticsearch.unused
Prometheusโ€”Metrics collection (leftover).unused
node-exporterโ€”Server metrics for Prometheus (leftover).unused
Nightly backups (cron, runs here)

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

In plain terms: a separate machine that does work outside the live request โ€” sending emails, syncing partners, recalculating prices, on a schedule or on demand.
  • Instancei-00fa9eb40442ebf69 ยท 54.203.134.44 ยท us-west-2a
  • Sizer6a.xlarge (memory-optimised)

Running directly on the server native

ServiceWhat it does
Celery: high / mid / lowThree worker groups by priority โ€” urgent, normal, and batch jobs.
Celery: crowdinA dedicated worker for translation sync, kept separate so it can’t slow down bookings.
Celery beatThe 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.

Open item โ€” the local Redis container here

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.

DatabaseSizeHolds
Aurora writer
padi-travel-covid19-aurora
db.r7g.4xlargeThe main database โ€” all bookings, products, accounts, prices. Handles all writes and most reads.
Aurora reader
โ€ฆ-aurora-r1
db.r7g.largeA 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.microResults & feedback from an AI-translation experiment (German only). Separate from the main cluster.

Which part of the app uses which database

App connectionGoes toNotes
defaultAurora writerNormal reads & writes
longAurora writerSlow/export queries (longer timeout)
replicaAurora readerPartner API reads only
translationsRDS translationsAI translation data
Known hot spot

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.

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.

BucketHolds
s-diviac-comPublic images, media & static site files. Served via CloudFront.
s-padi-travel-privatePrivate files (access-controlled).
padi-travel-export-prodData exports for the Dive Shop Locator & shop integrations.
backups-for-diviacNightly database & Redis backups.
logs-for-diviacArchived 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.

FunctionWhat it doesReads from
Dive-site listingServes the dive-site list quicklyOpenSearch
Course locatorServes the course finderOpenSearch + database
Partner shop list / statusShop data & visibility for resellersDatabase
Partner authorizerChecks partner API tokensDatabase

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:

Stripe โ€” payments AWS Cognito โ€” login/SSO Hyperwallet โ€” operator payouts Salesforce โ€” CRM Mailchimp โ€” email Crowdin โ€” translations Firebase โ€” push Sentry โ€” error tracking

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

ItemDetail
Server size drift driftThe 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 handNo automated production deploy; two servers updated manually. See the production runbook.
Crawler pool is hand-managedThe bot-traffic pool exists only here and isn’t part of the automated setup โ€” it can quietly break on a server rebuild.
Unused containersKibana, Prometheus and node-exporter run but do nothing useful.
Jobs-server Redis to confirmThe role of the Redis container on the jobs server is unconfirmed.