Scaling Temporal: 400M Workflows with Continue-as-New Pattern

Thank you very much. Excellent advice. Please tell me, in this case, will HasPending() consider this channel in its response for update handlers?

I don’t understand the question. HasPending is a property of a Selector. So if any branch of Selector is ready to fire, it will return true.

But then I don’t quite understand how to correctly estimate the number of shards that might be needed.

There is no simple answer as it is very hardware and use case specific. See this blog for more info: Choosing the Number of Shards in Temporal History Service | Mikhail Shilkov

Oh yes, I think I didn’t specify my question. But most likely I meant 400 workflows and, consequently, 400 activities, 400 signals. Just imagine processing 400 orders every second, so all of them should successfully trigger the workflow and further work of activities, signals.

I see. This might push limits of what is possible with non Cassandra DB. I personally would recommend using Temporal Cloud. It would be cheaper than self-hosting and much less stressful for you.