Skip to content

Widhian Bramantya

coding is an art form

Menu
  • About Me
Menu
nats

Object Store in NATS: Storing Files and Blobs

Posted on September 6, 2025September 6, 2025 by admin

In the last article, we talked about the NATS Key-Value Store (KV), which is great for lightweight configuration and state management. But what if you need to store something larger, like a file, image, or binary data? For that, NATS provides the Object Store, also built on top of JetStream.

What is the Object Store?

The Object Store is a way to store and retrieve large binary objects in NATS.

  • Objects can be anything: documents, images, JSON files, backups.
  • Each object has a name and optional metadata.
  • Objects are split into chunks and stored in JetStream streams.

This makes it possible to use NATS not only for messaging, but also for managing distributed storage.

Why Use Object Store?

  1. Centralized Storage in Distributed Systems
    • Store configuration files, ML models, or static assets directly in NATS.
  2. Versioned Objects
    • Like KV, object store supports history of updates.
  3. Reactive Updates
    • Other services can watch for changes and get notified when a new object version is available.
  4. Integration with Messaging
    • Since it’s part of NATS, you can combine objects with pub/sub, request–reply, or queue groups.

NATS Object Store vs S3/MinIO

It’s natural to compare NATS Object Store with popular object storage systems like Amazon S3 or MinIO. While they share the idea of storing objects (files, blobs), their goals and strengths are different.

AspectNATS Object StoreS3 / MinIO
Built onJetStream (messaging + persistence)Distributed object storage layer
Data sizeSmall to medium objects (KBs → few MBs)Large objects (GBs → TBs)
AccessThrough NATS clients (Go, Node.js, Python, etc.)REST API (HTTP/HTTPS, SDKs)
Real-time watchNative — services can Watch and react immediatelyNot built-in; usually requires polling or event integration (like S3 Event Notifications)
VersioningBuilt-in, with history of object updatesSupported, but more for archival and compliance
IntegrationTight with NATS messaging (pub/sub, KV, streams)General-purpose storage, works independently
PerformanceVery low-latency for distributed systemsHigh throughput for large-scale file storage
Use caseShare configs, ML models, backups inside NATS ecosystemStore massive data sets, media files, long-term archives

Example Perspective

  • NATS Object Store:
    • A machine learning team stores the latest model (ml_model.pkl) in NATS.
    • Prediction workers watch the bucket and automatically reload when the model changes.
    • Perfect for fast updates and small-to-medium files inside a NATS-powered system.
  • S3 / MinIO:
    • A video platform stores user uploads (gigabytes each) in S3.
    • CDN services then deliver those files to end users.
    • Perfect for large-scale storage, archival, and global delivery.
See also  Queue Groups in NATS: Load Balancing for Subscribers
Pages: 1 2
Category: NATS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Linkedin

Widhian Bramantya

Recent Posts

  • Log Management at Scale: Integrating Elasticsearch with Beats, Logstash, and Kibana
  • Index Lifecycle Management (ILM) in Elasticsearch: Automatic Data Control Made Simple
  • Blue-Green Deployment in Elasticsearch: Safe Reindexing and Zero-Downtime Upgrades
  • Maintaining Super Large Datasets in Elasticsearch
  • Elasticsearch Best Practices for Beginners
  • Implementing the Outbox Pattern with Debezium
  • Production-Grade Debezium Connector with Kafka (Postgres Outbox Example – E-Commerce Orders)
  • Connecting Debezium with Kafka for Real-Time Streaming
  • Debezium Architecture – How It Works and Core Components
  • What is Debezium? – An Introduction to Change Data Capture
  • Offset Management and Consumer Groups in Kafka
  • Partitions, Replication, and Fault Tolerance in Kafka
  • Delivery Semantics in Kafka: At Most Once, At Least Once, Exactly Once
  • Producers and Consumers: How Data Flows in Kafka
  • Kafka Architecture Explained: Brokers, Topics, Partitions, and Offsets
  • Getting Started with Apache Kafka: Core Concepts and Use Cases
  • Security Best Practices for RabbitMQ in Production
  • Understanding RabbitMQ Virtual Hosts (vhosts) and Their Uses
  • RabbitMQ Performance Tuning: Optimizing Throughput and Latency
  • High Availability in RabbitMQ: Clustering and Mirrored Queues Explained

Recent Comments

  1. Playing with VPC AWS (Part 2) – Widhian's Blog on Playing with VPC AWS (Part 1): VPC, Subnet, Internet Gateway, Route Table, NAT, and Security Group
  2. Basic Concept of ElasticSearch (Part 3): Translog, Flush, and Refresh – Widhian's Blog on Basic Concept of ElasticSearch (Part 1): Introduction
  3. Basic Concept of ElasticSearch (Part 2): Architectural Perspective – Widhian's Blog on Basic Concept of ElasticSearch (Part 3): Translog, Flush, and Refresh
  4. Basic Concept of ElasticSearch (Part 3): Translog, Flush, and Refresh – Widhian's Blog on Basic Concept of ElasticSearch (Part 2): Architectural Perspective
  5. Basic Concept of ElasticSearch (Part 1): Introduction – Widhian's Blog on Basic Concept of ElasticSearch (Part 2): Architectural Perspective

Archives

  • October 2025
  • September 2025
  • August 2025
  • November 2021
  • October 2021
  • August 2021
  • July 2021
  • June 2021
  • March 2021
  • January 2021

Categories

  • Debezium
  • Devops
  • ElasticSearch
  • Golang
  • Kafka
  • Lua
  • NATS
  • Programming
  • RabbitMQ
  • Redis
  • VPC
© 2025 Widhian Bramantya | Powered by Minimalist Blog WordPress Theme