App Types & States

App types

In Meya an app contains all your bot's BFML and Python code, as well as all associated data such as app logs, user data, analytics etc. There are three different types of apps that you can create in Meya, namely, dev, staging and production, and they have the following common attributes and constraints:

  • An app's BFML and Python code runs in it's own secure, containerized runtime.
  • An app is backed by it's own container image.
  • There are no code differences between app types, meaning that your BFML and Python code will work the same across all app types.
  • You can change the type of an app once created.
  • You can only change an app's type once it's been stopped.
  • There are important runtime and SLA differences between app types.
  • Pricing differs between app types.

The dev, staging and production app types have the following differences:

Dev apps

  • Dev apps are suitable for low volume deployments, and for app development.
  • BFML and Python code gets hot reloaded into your app runtime.
  • Dev apps do not support auto scaling.

Staging apps

  • Staging apps are suitable for low volume deployments, and for app testing/QA
  • BFML and Python code changes require the app container image to be rebuilt and redeployed.
  • Staging apps do not support auto scaling.

Production apps

  • Production apps are meant for high volume deployments.
  • BFML and Python code changes require the app container image to be rebuilt and redeployed.
  • Production apps will automatically scale up as usage increases.
  • Meya provides a higher SLA for production apps to ensure uptime.

Changing app type

You can only change an app's type in the Meya Console on the app's settings page. Note, that you first need to stop the app before you can change the app type.

2062

📘

Selecting the most suitable app type

Below is a simple guide that you can use to select the best app type for your needs:

  • Low user & low event volume (0 - 5,000 MAU, avg 0-200 events/MAU): dev or staging
  • Low user & high event volume (0 - 5,000 MAU, avg 200+ events/MAU): production
  • High user & low event volume (5,000+ MAU, avg 0-200 events/MAU): production
  • Higher user & high event volume (5,000+ MAU, avg 200+ events/MAU): production

App state

In Meya each app has its own secure, containerized runtime that runs on Meya's infrastructure. An apps runtime can transition between the following states:

  • stopped: The app's runtime has been stopped and is not processing any entries.
  • starting: The Meya Console is creating the initial infrastructure for your app's runtime.
  • deploying: The Meya Console is updating your app's runtime deployment, replacing the old runtime with the newly built app container image. Deployments are always rolling deployments, meaning your won't stop processing entries while the new app runtime is being deployed.
  • running: The app's runtime is running on Meya's infrastructure and is processing entries.
  • error: There is an error with the app's runtime. An app could transition to an error state for the following reasons:
    • The app's internal health check failed. In this case Meya support will help diagnose the problem.
    • The app is running an old version of the Meya SDK: < 2.6.10. This will simply require you to rebuild your app to get the latest version of the Meya SDK.
    • The app could not load your BFML code. This should generally not occur if you're using the Meya Console or Meya CLI because the BFML code gets validated before pushing the changes into the app runtime. This could, however, happen if you're manually pushing code using meya git and the Meya GraphQL API.

👍

Note that BFML runtime errors and Python exceptions will not put your app in an error state.

Push state

Whenever you push changes to your app, the Meya Console will initiate a push to track the asynchronous build process. Each push can go through the following states:

  • queued: The push is queued, waiting for the build services to start executing the build process.
  • cancelled: The push was cancelled. Note, that only a push in the queued state can be cancelled.
  • running: The build service has dequeued the push and started processing the changes.
  • building: The build service is building your app's new container image.
  • deploying: The build service has updated your app's deployment configuration, and has initiated a rolling deploy.
  • completed: The build and deploy completed successfully.
  • failed: The pushed failed. A push can fail for a number of reasons:
    • There was an error in your install.sh build script.
    • The build and/or deploy took too long and timed out. The maximum time is 30mins
    • There was an internal error, and the build service crashed.

Start/stop an app

You can start and stop an app using either the Meya Console or the Meya CLI. In the Meya Console you can use the following action buttons:

492

If you've set up the Meya CLI and connected to your app, you can use the following commands: