Kraite (all-in-one production)
kraite is the only production server. It owns every stateful dependency, every trading process, and every server-backed user surface.
What runs here
| Layer | Services |
|---|---|
| State | MySQL and Redis on loopback |
| Trading | Scheduler, dispatch daemon, unified Horizon |
| Streams | Binance mark prices and user data |
| Web | Nginx and PHP-FPM for admin/API and public site |
| Static | Exported syntax documentation |
Application paths live below /home/kraite. Routine commands run as the kraite Linux user. Sudo is limited to service, package, ownership, and other operating-system work.
Startup order
- MySQL and Redis become healthy.
- PHP-FPM and Nginx can serve the tagged web applications.
- Unified Horizon starts with the
kraiteenvironment. DispatchDaemonCommandstarts.StreamBinancePricesCommandstarts.StreamBinanceUserDataCommandstarts.- The scheduler is enabled last.
On first install, migrations and the sysadmin-only seed complete before step 3. The database must contain zero accounts, positions, and orders.
Worker budget
| Lane | Processes |
|---|---|
| Positions | 2 |
| Orders | 3 |
| Priority | 1 |
| Cronjobs | 2 |
| Indicators | 3 |
| User data | 1 |
| Web jobs | 1 |
| Direct host work | 1 |
Resource boundary
Fourteen Horizon workers are the starting ceiling for the 8 GB host. MySQL, Redis, PHP-FPM, and long-running daemons need reserved memory. Capacity changes must follow observed memory and queue pressure, not the former fleet's counts.
Public and private boundaries
Nginx exposes SSH, HTTP, and HTTPS only. MySQL and Redis never bind publicly. The ingestion application is not a general public API; mobile calls terminate at the admin route boundary.
Release behavior
Established releases cool the runtime, verify a backup, deploy exact tags, migrate once from ingestion, clear deployment diagnostics, and warm in startup order. Admin and the public site do not run duplicate Horizon instances.