other question, to be honest my project is a uptim...
# best-practices
f
other question, to be honest my project is a uptime kuma like : should I create one deployement for all probes (where each probe is a website as example) or as much deployment than website to probe ?
r
I would create one - run it with the url as param
f
not sure to understand
"create one" per website, or globaly ?
r
one deployment - pass the url's you want to http check as a param
f
but the url could be add or removed / updated on the fly by tenants / customers so I must either 1 : create one global deployment which will get urls from a database then create N number of tasks, 2 : one deployment per url with the url as params
I'm wondering the cost of N tasks (solution 1) vs N deployments (solution 2)
also, forgive me for my poor english 😅
r
No worries - you can dynamically create the flow runs though
f
yeah I know, my goal is to schedule probing website every minutes (or 30s, 2mn, etc), not create them from another source
r
how many different urls?
f
ptentially thousands
r
its actually interesting as I am doing something similar with puppeteer - SASS synthetics are expensive at scale
f
also with 1 deploy per urls I would load balacing across multiples nodes the work of probing urls
r
a deployment per url seems very excessive and hard to maintain - I would have a single deployment which wakes on a schedule and picks the next n urls to test from a queue/db table
are you using k8's
f
for now i's a personnal project, Ididn't even writted any line of code
but I will probably ship a OCI image so it should run on k8s
r
you can have the schedule to fire every second - the agent will pick up 10 scheduled flows at once and spin up 10 k8s pods to do the work
also depends on the schedule for each url - is it every 10mins/hourly - you would have to shard with work queues appropriately
f
my target is to do an http req for each url every minutes
so every urls will cost 1440 req per day
https://uptime.kuma.pet/ that's basically what I trying to achieve
r
yeah, its an interesting problem with a good few ways to tackle it