Machine Resource Allocation#
This reference will dive into the technical details of how CPU, RAM, and other resources are schedule and allocated within your app hosted on CodeRed Cloud. For information on software available on the host, see Host Software.
It is important to remember that by default, hosted apps are tuned to perform optimally for typical website use-cases (e.g. serving files, making database queries, rendering templates). CodeRed Cloud is not tuned for running scientific research, data analysis, video rendering, bitcoin mining, etc.
A worker is generally a process which loads a copy of your code into memory and is ready and waiting to handle HTTP requests. Therefore a site with 4 workers in theory could serve 4 HTTP requests simultaneously. In practice, even on the busiest websites, HTTP requests are usually staggered by several milliseconds. So if the total request-to-response time for your site is 200 milliseconds, then each worker would be capable of handling 5 requests per second, totalling to 20 requests per second in this example.
Workers generally do not serve static or media files, they only process Python or PHP code. So in our example of 4 workers (20 requests per second), this means 20 actual Python or PHP requests per second. Static and media file requests are natively served by the CodeRed web server, without ever invoking your Python or PHP code, and do not count against your worker resources.
Each worker is reserved approximately 256 MiB of RAM and 256 MHz of CPU time. RAM is shared among all workers, so 4 workers would have a total of 1 GiB distributed between them as needed. CPU time is shared among all workers, so 4 workers would have a total of 1 GHz distributed between them as needed. Workers can burst CPU speeds up to 3.5 GHz but are constrained to an average of the total reserved CPU time, averaged in microseconds, per second. Workers are also usually scheduled across multiple CPU cores to improve concurrency. If you have a CPU-intensive or RAM-intensive app, contact us about our Custom plan.
CodeRed Cloud hosts (for production websites) are very large datacenter servers hosted by Microsoft Azure in the respective region. Currently, all production hosts employ AMD EPYC 7763v processors paired with fast solid-state drives. Hosts range from 8 CPU cores and 32 GiB RAM, up to 96 CPU cores and 384 GiB RAM.
Enterprise accounts may be configured with their own dedicated host servers and database servers. These servers may be shared between all apps on the enterprise account, or dedicated to a single app, depending on the customer’s desired configuration.
Enterprise accounts may also create custom firewall rules to allow or deny specific IP addresses from their dedicated servers.