ModelOps shared data services: MySQL, object storage, shared filesystem
The platform holds three kinds of persistent data with completely different characteristics: relational metadata, large immutable artifacts, and files shared by multiple Pods. Gathering all three onto shared infrastructure physically while keeping per-service boundaries clear logically is the core of this platform’s data layer design.
Relational metadata: eight logical databases on a shared MySQL
Section titled “Relational metadata: eight logical databases on a shared MySQL”The default deployment gives each related component its own database, scattering engines, backups, and patch points across many places. This platform standardizes on MySQL as the engine and keeps per-component logical databases separated inside a single cluster.
| Component | Database | Purpose |
|---|---|---|
| Pipeline API | mlpipeline | Run, Experiment, and task state |
| Pipeline cache | cachedb | Execution cache |
| Pipeline metadata store | metadb | Context, execution, and artifact metadata |
| Experiment management | katib | Experiment and Trial results |
| Model Registry | model_registry | Registered model and version metadata |
| Object storage filer | seaweedfs_filer | Directory tree and file-to-chunk mapping |
| MLflow | mlflow | Experiment, run, metric, tag, and model registry metadata |
| JupyterHub | jupyterhub | Users, groups, servers, OAuth tokens, and spawn state |
Each component uses only the logical database assigned to it and its own dedicated application role. Administrator credentials are not mounted into workloads; instead, the Service name upstream expects is preserved while an ExternalName alias Service points at the actual writer endpoint. Even if the cluster or proxy configuration changes, only the alias Service target needs to change and the application Deployment’s connection settings stay as they are.
Why async replication
Section titled “Why async replication”A MySQL operator at this scale requires choosing between group replication and async replication. This platform uses async. The reason is that the ML metadata schema used by the pipeline metadata store and the model registry contains tables without a primary key. Group replication requires every table to be InnoDB and to have a valid primary key; when that condition is broken, the cluster reboot itself fails during the operator’s crash recovery validation stage. Async replication has no such constraint and accepts the existing schema as is.
Switching the authentication plugin for legacy client compatibility
Section titled “Switching the authentication plugin for legacy client compatibility”Some older metadata store clients do not support modern MySQL’s default authentication method and only support legacy native password authentication. Modern MySQL disables this plugin by default, so it must be re-enabled in the server configuration and the root account’s authentication plugin switched the same way before clients can connect. This switch is managed as an idempotent bootstrap procedure so that even if the operator rotates credentials and reverts the plugin, re-running it restores the state.
Pitfalls when switching the DB engine
Section titled “Pitfalls when switching the DB engine”When migration to another DB engine was examined, some components’ official images did not support that engine’s driver, or even when support was documented, the component’s internal queries actually depended on engine-specific syntax (aggregate functions, upsert statements, join-update statements, and so on) and failed at runtime. A successful driver connection and a fully working lifecycle (create, read, update, cache, archive) are different matters, so per-component query compatibility must be verified before changing engines. Based on the verification results, this platform chose as its baseline the engine that lets the official image combination be kept.
Object storage: a shared S3-compatible cluster
Section titled “Object storage: a shared S3-compatible cluster”The default pipeline deployment embeds its own object storage inside the component. This platform removes that embedded workload and instead has multiple components share an S3-compatible storage cluster in a separate namespace (composed of master, volume servers, filer, and S3 gateway).
- The pipeline API and workflow engine share a single bucket, but tenant access is separated by per-namespace directory prefixes and dedicated identities/policies.
- MLflow accesses only a separate bucket with a dedicated identity.
- Platform applications each use their own dedicated bucket and dedicated access key.
Because each consumer uses a different bucket and identity, a leak of one consumer’s credential does not lead to access to another consumer’s objects.
Separating storage and metadata roles
Section titled “Separating storage and metadata roles”Roles are divided inside the object storage cluster too. The master handles volume topology and cluster metadata, and the volume servers hold the actual object chunk data. The filer handles the directory tree and file-to-chunk mapping, and it is configured to store that metadata in the shared MySQL instead of a local embedded store. In other words the filer’s own disk is not the authoritative store; the actual authoritative metadata lives in the filer-dedicated database in MySQL. Backup and recovery must therefore treat “MySQL metadata” and “volume server data” together against the same recovery point. Restoring only one produces an inconsistency where the metadata points at chunks that do not exist, or chunks exist without metadata.
The unfinished part of IAM auto-provisioning
Section titled “The unfinished part of IAM auto-provisioning”There is a controller that automatically creates per-tenant object access identities, but the internal IAM API endpoint that this automatic creation depends on is not exposed in the current configuration. As a result, automatic creation of object storage credentials for a new tenant namespace can be left incomplete. Unless such a gap is documented, it makes people spend hours debugging RBAC “thinking it is a permission problem”, when in reality the auto-provisioning path itself is broken.
Shared file system: per-workload isolated directories
Section titled “Shared file system: per-workload isolated directories”For cases that need a POSIX file system, such as Notebook shared files and some stateful workloads, the platform uses shared filesystem storage. In this implementation, existing SeaweedFS Filer directories are registered as CSI Static PVs and exposed through PVC filesystems. The core principle is that “even when using shared storage, a single PersistentVolume always mounts exactly one directory.”
Filer directory tree├── jupyterhub/ -> PV(jupyterhub) -> PVC(jupyterhub namespace)├── inference/ -> PV(inference) -> PVC(tenant namespace)├── mysql-0/ -> PV(mysql-0) -> PVC(mysql StatefulSet ordinal 0)└── storage-master-0/ -> PV(storage-master-0) -> PVC(storage StatefulSet)The CSI node driver and mount service perform FUSE mounting on the node, while workload Pods reference only PVCs without privileged access. SeaweedFS CSI Static Volumes covers the Static PV/PVC binding and operational boundaries of CSI updates in detail.
The basic Kubernetes property that PVs are cluster-scoped and PVCs are namespace-scoped acts here as a practical isolation boundary. A workload can only reference a PVC in its own namespace, so different tenants or different stateful replicas cannot accidentally share the same directory.
ReadWriteManymeans multiple Pods can mount it, not that concurrent writes are safe. Each replica of a stateful workload must have its own directory.- Static PVs use the
Retainpolicy. Deleting a PVC does not automatically delete the backend directory or the PV. In exchange for preventing data loss, a human must check leftover data and binding state before reuse. - When increasing replicas, directories, PVs, and PVCs must be prepared per ordinal first. Skipping this order can make two replicas share the same directory and corrupt data.
Pre-deployment checklist
Section titled “Pre-deployment checklist”- Assign an owner and a backup owner for each of the database, object storage, and shared file system.
- Supply credentials from a separate secret management layer rather than Git, and do not deploy placeholder manifests as they are.
- Define retention policy for metadata, artifacts, and files in advance for tenant deletion.
- In recovery drills, distinguish “restore a single service” from “restore metadata plus data to the same point in time” and verify each separately.
Combined with the identity system covered in ModelOps authentication flows, this shared data layer forms the platform’s data safety together with the external exposure boundary discussed in the next article (ingress and observability operations).