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.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1d112fc7-f104-4596-be0a-e47d5abce279/Untitled.png

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 7, and Ubuntu 18.04.3 are responsible for doing all of this work.

The app server is a single DigitalOcean droplet. 1 vCPU / 1GB Memory / 25GB Disk ($5/month) Backups ($1/month)

Database Server (db-1)

The database server, obviously, stores and retrieves data. The database is approximately 100GB in size and has over a billion records; most of that being runtime history. Fun fact: The database used to be over 200GB. The size was reduced tremendously with some common sense and a number of fun tricks. It now grows at close to 120MB per month.

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. I plan on setting up an entire MySQL slave server with replication soon.

MySQL 8 is my database engine of choice.

The database is a single DigitalOcean droplet with attached block storage. Server: 2 vCPUs / 2GB Memory / 25GB Disk ($15/month) Backups - Server only ($3/month) Block Storage: 120GB ($12/month)

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.

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/75d2005b-af22-4126-ad74-1466c632333d/5.png

The logging server is a single DigitalOcean droplet. 1 vCPU / 1GB Memory / 25GB Disk ($5/month) Backups ($1/month)

Discourse Server (discourse)