The Quotas Bundle is helpful when you want to restrict the size of a database. By setting a hard limit and a soft margin, the bundle will make sure you never exceed the space you designate for it to use.
The database size is calculated based on the Esent or Voron data files (excluding the logs), plus the space the indexes are taking on a disk.
Once the hard limit has been reached, no additional documents will be let in the document store. However, indexing operations will resume normal operation, even if it means that the database size will go way over the hard limit. It is so by design, to make sure that the database is fully operational, even when the hard limit has been reached.
A soft limit is defined by the hard-limit minus the soft-limit margin, both are configurable. The first time the soft limit is reached, a warning under
Raven/WarningMessages with the
Size Quota prefix appears.
To activate compression server-wide, simply add the
Quotas to the
Raven/ActiveBundles configuration in the global configuration file, or setup a new database with a compression bundle turned on using API or the Studio.
Any bundle which is not added to ActiveBundles list, will not be active, even if it is built-in or the relevant assembly is in the
To learn how to create a database with quotas enabled using the Studio click here.
Configure the following values by adding entries to your server configuration or database settings:
The hard limit after which we refuse any additional writes.
The soft limit before which we will warn about the quota.
The hard limit after which we refuse any additional documents.
The soft limit before which we will warn about the document limit quota.