Hosted solution scalability

Is there more information about the scalability and redundancy capabilities of the paid-for hosting solutions offered by Anvil? I’m under the impression all plans give you a single dedicated server, at best, except maybe the enterprise option. Is that a misunderstanding?

1 Like

Hi @jamesghutchison,

Roughly speaking, there are three tiers of Anvil plan:

  1. Free, Personal, Professional and Business plans all use fully shared hosting. All your traffic is handled by shared servers; your Server Modules run in the same place as everyone else’s; your Data Tables data lives in shared databases. We do our best to enforce fairness, so that “noisy neighbours” don’t affect your app’s performance, but ultimately these are all shared resources. Because everyone is using a shared fleet of servers, this also provides redundancy – if something fails, we shift the affected workloads around to resources that are still working.

  2. Dedicated plans have dedicated resources for Server Modules and Data Tables. This means that there’s a dedicated server handling your Server Modules and the database that holds your Data Tables. Your apps are still using shared resources (load balancer, code storage, code routing, etc), but the big-ticket items that typically limit performance can now stretch their legs. You pay AWS prices (no markup) for the server itself, so you can beef it up with as much CPU, RAM and storage as you need. In addition, because you’re not sharing a database, you can connect directly to the Postgres instance and execute SQL against your Data Tables.

    Dedicated server failures are rare, and usually recover immediately (typically with a reboot of the underlying instance). It’s also possible to add more dedicated instances to a Dedicated plan (it’s $650/mo per), but at that scale you might well want to scale up to an Enterprise installation.

  3. Enterprise plans have dedicated everything. It’s an entire Anvil cluster – the same software that runs anvil.works – but running on one or more computers that are entirely “yours”. They might be physically your computers, running in your datacentre, or instances in your AWS/Azure/GCP account. If you don’t want to manage anything yourself, we can even host, manage and update an Enterprise instance for you, in any region of any cloud (want all of Anvil in AWS Sydney? Not a problem.) – and if we’re managing it, we’re carrying the pager :wink:

    Enterprise instances can scale horizontally, adding additional servers to handle load or provide extra resilience. They can also provide true per-app isolation: If you have a particular app that shouldn’t be affected by others, you can set up dedicated load-balancers, Anvil management servers, databases, and Server Modules servers exclusively for your app’s traffic.

If you’re interested in setting up an Enterprise or Dedicated account, please do drop us a line at sales@anvil.works!

6 Likes

Thank you for the informative response @meredydd! A follow up question about the shared hosting - is there usage limits? The scenario I am most concerned about:

  • I’ve created an app and have no idea how much the idea will resonate with people
  • I post a link to it on reddit
  • I get a lot of traffic from people curious about it and wanting to learn more.

My concern is that this simple surge in traffic isn’t handled gracefully and people are put off by it not loading. This would result in lost potential customers and a poor first impression. This is especially a problem if it wasn’t built to handle more than a couple concurrent users at a time. Since I don’t know how this is received, and its funded by me, I’m not ready to throw any serious money at it, especially pre-emptively.

There’s also an alternative concern that’s similar - lets say I have an app with a niche use case, but I expect it to periodically have a surge in traffic during the afternoon of weekends, I don’t want to have to pay to idle a bunch of capacity throughout the rest of the week.

The answer to this is obviously “yes”! Anvil plan capacity is denominated in Compute Units, which is approximately “an average of one Server Function running at any given moment”. We will soon be rolling out better tools for visualising your app’s CU usage, so you can see what that means for your app.

If you do experience a spike, we do our best to make it a “soft” failure (ie you’ll get an email suggesting it’s time to upgrade to a higher plan a decent time before the hammer comes down, so you don’t lose your Reddit spike), unless the load is actually affecting other Anvil users. Again, we’ll be rolling out better tooling for visualising this soon.

Your actual app’s usage is going to depend heavily on what your code does – how efficient it is, how hard it uses the database, etc. A rule of thumb for a simple-ish app, though, is that on a Personal plan it won’t last long on a popular subreddit’s front page, but a Business plan should be OK and a Dedicated plan should cruise through it comfortably.

1 Like

@meredydd Does the professional plan have more capacity over personal?

Very much so! Between double and triple, IIRC.

Hi @jamesghutchison,
If it’s helpful here, is the experience we had with scaling up our app with our volume. We are currently running at the dedicated level:

Best of luck scaling and congratulations on all the interest about your app!

1 Like