Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When a user makes a first request to a Blueriq application, the model that defines the application is loaded into memory. This makes the first request slower that than the subsequent requests.

In some situations, it may be desirable to load some models into memory during the Runtime startup, especially when the model is large and takes a long time to load. An example is when you have a runtime cluster and use auto scaling you don't want the first request to a fresh new server to take a lot of time, because the model is not yet loaded.

You Since Blueriq 13.8, you can control which models get preloaded during Runtime startup with properties described in in Model Preloading Properties.

Considerations

Preloading models will remove the load time from the first request, but the load time will be added to the Runtime startup, so runtime startup will take longer.

...

  • The model will definitely be used
  • The model is big, so the user would have to wait for an unreasonable timespan in the first request

Preloading after accepting HTTP requests

By default, configured models are loaded before the Runtime accepts HTTP requests. This means that the load times of all models will be added to the Runtime startup time, but you will have the guarantee that all designated models are loaded once the runtime is started.

...