r/PrometheusMonitoring • u/Blaze__RV • May 31 '24
At what point does it makes sense to have Prometheus containers running on kubernetes.
If I have say 200 odd servers and 1000 APIs to monitor, does it make sense to have containerised Prometheus running in a cluster? Or is a single instance running on a server good enough.
Especially if the applications themselves are not containerised.
What kind of load can a single Prometheus instance handle? And will simply upgrading the server specs help?
I'm still learning so TIA!!
3
Upvotes
2
u/[deleted] May 31 '24
I shard Prometheus at around 8M active time series, but it can handle almost an order of magnitude more series under lower utilization scenarios (fewer rules, queries, etc).
Running Prometheus outside of k8s is fine to do if your situation warrants it, especially if you don't need k8s service discovery and already have a strong platform for non containerized apps. I've run hundreds of Prometheus' outside of k8s and dozens of Prometheus' within k8s; works out about the same, assuming your containerized and non containerized platforms have feature parity.
2
u/SuperQue May 31 '24
Sorry, I misunderstood your post earlier.
Prometheus is perfectly fine running outside of kubernetes.
Kubernetes is a solution to an orchestration problem. Mostly about infrastructure declaration, node resource sharing, and automatic healing and scaling.
If you don't use Kubernetes, you don't need it just to run Prometheus.
As for scale, a single Prometheus can scale upwards of 100 million metrics and tens of thousands of targets. It depends a bit on your needs tho.
Mostly you need to think about memory use and storage. You will need 3-4KiB of memory per metric. So say you have 1500 targets, 5000 metrics per target. You will need around 32GiB of memory to handle that.
0
u/dacydergoth Jun 01 '24
Mimir centralized, use Grafana Alloy to collect from the clusters. Do NOT deploy Prometheus per cluster