Horizontal Scaling Series — Part 1: MinIO and Shared Object Storage
When we horizontally scale an application, adding more instances is only part of the solution. We also need to consider where the application stores its data and how other instances access it. While exploring horizontal scaling, I came across MinIO, an S3-compatible object storage system, and wanted to understand how it helps address one of these challenges. The problem: Local storage in a…
When scaling an application horizontally, adding more instances is not enough. The application's data storage and access methods also need consideration. MinIO, an S3-compatible object storage system, offers a solution to this challenge. In a distributed application with multiple instances, each instance has its own local storage.
If one instance, say App-1, stores a video on its local disk, another instance, App-2, cannot automatically access that file when a subsequent request arrives. Each instance's filesystem creates a dependency between the data and the instance storing it.
MinIO introduces shared object storage, a separate storage layer that multiple application instances can access via S3-compatible APIs. Instead of storing files exclusively on local disks, application instances can store and retrieve objects from shared storage. This decouples file storage from individual application instances, making horizontal scaling easier to manage.
The principle applies to various systems, such as video streaming, computer vision, and backend services dealing with user uploads, documents, and reports.
While MinIO simplifies shared file storage, it doesn't automatically make an application horizontally scalable. Other aspects, like database connections, sessions, distributed coordination, and instance-specific state, still need addressing. However, selecting the appropriate storage architecture is a crucial step. Future installments in this series will delve into distributed coordination, leader election, shared state, and database considerations when managing multiple service instances.
A key takeaway: Scaling application instances is simplified when shared data and instance-specific responsibilities are deliberately separated.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to