Hardware

All of the hardware is hosted with DigitalOcean. They have a solid platform and their service lets me provide a fast service with high availability.

Untitled

Application Server (app-1)

This server hosts the images, fonts, and scripts that get downloaded to your computer whenever you access beestat. It is also responsible for processing all inbound and outbound API calls, including the behind-the-scenes data sync that makes loading beestat fast.

Apache, PHP 8, and Ubuntu 18.04.3 are responsible for doing all of this work.

<aside> <img src="https://beestat.io/img/notion/info.svg" alt="https://beestat.io/img/notion/info.svg" width="40px" /> The app server is a single DigitalOcean droplet. 1 vCPU / 1GB Memory / 25GB Disk ($6/month) Backups ($1.20/month)

</aside>

Database Server (db-1)

The database server, obviously, stores and retrieves data. The database is approximately 200GB in size and has billions of records; most of that being runtime history.

Part of my policy is that the database server is not allowed to do anything complex. Almost all queries are simple creates/inserts/updates to keep load down.

Backups are performed on the server only, not the block storage as backing up block storage for a database server is not optimal.

MySQL 8 is my database engine of choice.

<aside> <img src="https://beestat.io/img/notion/info.svg" alt="https://beestat.io/img/notion/info.svg" width="40px" /> The database is a single DigitalOcean droplet with attached block storage. Server: 4 vCPUs / 8GB Memory / 25GB Disk ($48/month) Backups - Server only ($9.60/month) Block Storage: 400GB ($40.00/month)

</aside>

Logging Server (log)

Logging is actually handled two separate ways. First, nearly every inbound and outbound API call get logged to the primary database server. This gives me detailed records that I can use to debug issues.

For long-term analytics, I utilize a TICK server. This is simply a server that runs a database engine and some other tools that specialize in handling this type of data.

Untitled

<aside> <img src="https://beestat.io/img/notion/info.svg" alt="https://beestat.io/img/notion/info.svg" width="40px" /> The logging server is a single DigitalOcean droplet. 1 vCPU / 2GB Memory / 25GB Disk ($12/month) Backups ($2.40/month)

</aside>

Discourse Server (discourse)