Is postgres on the same machine or on a separate one?
Same machine, everything is on the same machine (dedicated server aka bare metal, not vps/cloud).
Thanks for the reply! May I ask how far you go with respect to reliability/availability? Do you have a live replicated server on stand by or just replicate a log stream elsewhere, something else?
are you using any specific Go web framework or just the standard library?
I am using fasthttp[1]
Elasticsearch - for searching/recommendations
Redis - hot data (certain data is only kept in redis)
Postgres - for the rest of data
Clickhouse - analytics
Most of the system is written in Go. Whole system was tuned for performance from day one. As to latency, data from the last 21 million requests today:
p99: 17.37 ms
p95: 6.86 ms
avg: 2.37 ms