On-demand Dyalog workspace launch vs resident MiServer session for a low-traffic service
0 reputation · 07 Sept 2023, 21:37 UTC
0 reputation · 07 Sept 2023, 21:37 UTC
I have a low-traffic Dyalog-based HTTP workload that receives only a handful of requests per hour, with long idle gaps. I am weighing two documented deployment shapes: cold-starting the interpreter with a workspace and a latent expression (⎕LX) per invocation or on a schedule, versus keeping a MiServer-based web service resident so requests are served by an already-loaded session.
The goal is to reduce ongoing cost. A resident MiServer instance holds memory and a runtime footprint continuously, which feels wasteful at this traffic level, but per-invocation launch means paying workspace load and ⎕LX initialization time on every request, and I do not know whether my callers will tolerate that latency. There is also a licensing dimension: Dyalog editions differ, and I have not yet confirmed whether my intended use qualifies for a particular edition, so the license terms may dominate compute cost either way.
For workloads in this traffic range, does per-invocation cold start of a Dyalog workspace typically end up cheaper operationally than a small always-on MiServer session, once memory footprint is accounted for?
What workspace characteristics (size, component file reads, external library loading) most strongly drive cold-start latency, so I can judge whether on-demand launch is even viable?
Is there a documented middle ground, such as a minimal persistent session with deferred loading, worth considering before committing to either extreme?
A thoughtful contribution can make all the difference. Be the first to share one.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.