Infrastructure status when all plans are completedCompare & Conversion planâ used as a common goal for the whole team: each item below either already exists, or is associated with a specific step (0Aâ3C) in the plan.
Differences from the present are markedNEW. Anything not marked as remaining from the running system.
firewall-sshâ patchedNEW · 0A/0Bset_real_ip_from) · :22 admin/VPN IP limit · port data is still default-denysync-nginx.sh (1C)Each labelNEW · xpoints to exactly one step in the conversion plan (0A, 0B, 1AâŠ3C). When a step is completed, the corresponding category on this diagram changes from "target" to "as is" â when all labels are complete, the two documents merge into one.
"Before" is the current status on July 4, 2026. "After" is the status when the plan is completed.
| Index | Before (current status) | After (destination) | Step |
|---|---|---|---|
| Gateway nginx | 1 instance â SPOFon V1 | 2 instance V1 + V4, Cloudflare LB health-check | 1Aâ1C |
| Firewall :80 vs nginx trust list | Deviation 5/15 vs 15/15â real traffic may be DROP | Match 15/15 | 0A |
| SSH :22 | Open the entire Internet | Limit admin/VPN IP(or documented alternative hardening) | 0B |
| Double-processing transactions on retry | There is no protection | Idempotency-Keyon every money endpoint | 1D |
| Connection to Postgres | No controlâ 11 potential clients vs max 100 | PgBouncer transaction mode, multiplex about ~20 real conn | 2B, 3A |
| Redis auth | No passwordâ rely only on firewalls | requirepass/masterauthâ 2 independent layers | 3C |
| Failover data (V3 dies) | Manual, not yet documented | Runbook promote slave(automation later) | 3C |
| Nginx configuration: keepalive / rate limit / timeout | Off / none / 60s | Turn on 32 / â20r/s / 15s-30sâ merged with DDoS Edge L0âL1 | 2C |
| OpenSearch | Permanently yellow, no retentionâ index from April 2026 intact | replicas:0, ISM deletes by dateâ green, disk is stable | toilet |
| Monitor container status | Dozzle 4/4 unhealthy fakeâ loss of value alarm | Healthcheck is correctâ unhealthy = real problem | toilet |
| Identify the server when SSH | V2/V3 have the same hostname | Unique hostname V1âŠV5 | toilet |
Do not rent additional servers. The only change in layout: V4 gets nginx-lb #2 and PgBouncer placed next to Postgres master on V3.
| Server | Target role | Change from now |
|---|---|---|
| V1 · CCX23 · 10.0.0.5 | Gateway #1 + App | No change in ingredients; less "unique" â allowed to maintain/deploy errors and still have the system live |
| V2 · CCX13 · 10.0.0.4 | App | The number of instances can be reduced by 4â2 according to the 2A (2 vCPU) measurement results; hostname changed to V2-Kiosk |
| V3 · CCX13 · 10.0.0.2 | Data master | + PgBouncer :6432 master edge; Redis adds requirepass; hostname V3-Kiosk |
| V4 · CCX13 · 10.0.0.3 | Gateway #2 + Replica + Tools | + nginx-lb #2 (:80 â after RAM audit, step 1A); hostname V4-Kiosk |
| V5 · CCX23 · 10.0.0.6 | Gamify + Log hub | OpenSearch: replicas:0 + ISM retention; nothing else changed |
V3 and V4 are two servers that "fit" 8GB RAM: V3 = Redis 1.5GB + Postgres buffers/cache ~4GB; V4 = 7 existing containers + new nginx. nginx only takes up a few dozen MB so it's okay, butAny service added to these two servers after the target version must recalculate the total RAM firstâ that's why step 1A has a RAM audit precondition.
"Who dies, what is lost" table â before and after the conversion. This is a direct measure of plan value.
| Problem | Consequences BEFORE | Consequences FOLLOW |
|---|---|---|
| V1 died | Whole system collapseâ lost only gateway, all domains died even though V2âV5 was still alive | The system is still runningâ Cloudflare LB switches to gateway #2 (V4) in ~15â60s; Temporarily lost 4/8 API instances, leaving 4 on V2 to carry |
| V2 died | Halve APIâ least_conn converges to V1 | As beforeâ unchanged (V2 only runs the app) |
| V3 died | Lost all write pathsâ promote slave manually, no pre-written process, unpredictable recovery time | Still lost writebut recovery according to 3C runbook is available step by step (promote PG slave :5433, change Redis replicaof, point back to backend env) â recovery time is measurable |
| V4 died | Lost replica + toolsâ does not affect users | Lost gateway #2 + replicaâ Cloudflare LB redirects to gateway #1, users are not affected; Temporarily lost the ability to failover data until V4 recovers |
| V5 died | Lost gamify + focus logâ is the same in both states; gamify is the specific SPOF of the gamification feature (accepted in target version v1, see section 06) | |
This conversion is eraseableworst scenario(V1 dies = whole system collapses) and turns the second worst scenario (V3 dies) from "unpredictable" to "processed". The death of the remaining two servers only causes local deterioration - the system still serves users.
Conversion is considered complete when the list below is ticked - each item has a specific command/test scenario, not accepted by feel.
nginx-lbon V1 (docker stop nginx-lb, off-peak hours) âcurl https://api.kioskservice.clubstill pay 2xx within 60s (pass through V4). Turn it back on, repeat in reverse.set_real_ip_from in default.conf.Idempotency-Key(dev environment) â exactly 1 transaction is recorded, the second response returns the first result.SHOW POOLS;on :6432 there is traffic;pg_stat_activityOn the master, count †30 real connections when the app is running at full load.sync-nginx.shwith a try change â conf on V1 and V4 are byte-for-byte identical (diff), bothnginx -t pass._cluster/health= green; Index older than N days (according to policy) automatically disappears.docker psAll 5 servers no longer have containersunhealthyno â every unhealthy from now on is a real problem.Make it clear so no one mistakenly thinks they've been forgotten â these are upgrade steps intentionally left for later, with activation conditions.
| Category | Reason to leave | Activates when |
|---|---|---|
| Cloudflare Full (strict) â TLS to origin | Need to install Origin CA cert + nginx listen 443 on both gateways; Flexible is still running fine and the firewall has been turned off | After the 2 gateways operate stably; or compliance requirements |
| Auto-failover data (Sentinel / Patroni) | Need â„3 nodes for quorum + operating skills; Manual runbook is the right stepping stone | The runbook drill showed that the manual RTO was unacceptable |
| HA for V5 (gamify + log) | Local SPOF of a feature, not core money-path | When gamification becomes a key revenue feature |
| Kubernetes | Both the guideline and the comparison are wrong â operating costs are not commensurate with the scale | The number of services/teams has increased many times |
| OpenSearch enables security plugins | Port has default-deny from the Internet; lower priority than retention | When there is a request for internal audit / more people accessing Dashboards |