SlideShare a Scribd company logo
5
Most read
12
Most read
17
Most read
Minio ♥ Go
A Cloud Native Object Storage
Harshavardhana
What is Minio? ☕
Minio is an object storage server released under Apache License v2.0.
Compatible with Amazon S3 cloud storage service.
Best suited for storing photos, videos, backups and container / VM
images.
Size of an object can range from a few KBs to a maximum of 5TB.
Is light enough to be bundled with the application stack, similar to
NodeJS, Redis.
Install
Binary
$ wget https://dl.minio.io/server/minio/release/linux-amd64/minio
$ chmod +x minio
$ ./minio version
Version: 2017-01-25T03:14:52Z
Release-Tag: RELEASE.2017-01-25T03-14-52Z
Commit-ID: f8e4700a11065967242b8857045ce7dee607722d
Docker
$ docker run --name minio -p 9000:9000 minio/minio server /export
Visit Docker quickstart guide for more details.
Run
Standalone FS (Filesystem)
$ ./minio server /dir1
Standalone Erasure
$ minio server /dir1 /dir2 /dir3 ... /dir8
Distributed Erasure
$ minio server http://192.168.1.11/dir1 http://192.168.1.12/dir2 http://192.168.1.13/dir3 
http://192.168.1.14/dir4 http://192.168.1.15/dir5 
http://192.168.1.16/dir6 http://192.168.1.17/dir7 
http://192.168.1.18/dir8
Distributed FS (Filesystem)
Deployment Architecture
Distributed Erasure Code
Dsync (Distributed Syncing)
No master node concept.
Resilient applies quorum techniques.
Drop-in replacement for sync.RWMutex / sync.Locker.
Automatically reconnect to (restarted) nodes.
Limited scalability and fixed configuration: up to 16 nodes.
Will not (re)acquire any stale locks.
Example Write Lock
func lockSameResource() {
// Create distributed mutex to protect resource 'test'
dm := dsync.NewDRWMutex("test")
dm.Lock()
log.Println("first lock granted")
go func() {
time.Sleep(5 * time.Second)
log.Println("first lock unlocked")
dm.Unlock() // Unblock first lock
}()
log.Println("about to lock same resource again...")
dm.Lock() // Waits here.
log.Println("second lock granted")
time.Sleep(2 * time.Second)
dm.Unlock()
}
Visit github.com/minio/dsync for more examples.
Data Distribution (Overview)
Data Distribution (Details)
// encodeData - encodes incoming data buffer into
// dataBlocks+parityBlocks returns a 2 dimensional byte array.
func encodeData(dataBuffer []byte, dataBlocks, parityBlocks int) ([][]byte, error) {
rs, err := reedsolomon.New(dataBlocks, parityBlocks)
if err != nil {
return nil, traceError(err)
}
// Split the input buffer into data and parity blocks.
var blocks [][]byte
blocks, err = rs.Split(dataBuffer)
if err != nil {
return nil, traceError(err)
}
// Encode parity blocks using data blocks.
err = rs.Encode(blocks)
if err != nil {
return nil, traceError(err)
}
// Return encoded blocks.
return blocks, nil
}
Data Protection
Bitrot (blake2b hash)
SIMD accelerated pure Go implementation using Go Assembly.
Three flavors: AVX2, AVX and SSE
Speed up over pure go (non-assembly): 3.94x
Performance comparison with other checksum techniques on AVX2.
$ go test -bench=ComparisonAVX2
BenchmarkComparisonMD5-12 1000 1726121 ns/op
607.48 MB/s
BenchmarkComparisonSHA1-12 500 2005164 ns/op
Bitrot (sha256 hash) on ARM64
Used in AWS S3 payload signature
verification and bitrot on
GOARCH:ARM64
Speed up over pure go on ARM64:
105x
| Processor
| Package |
Speed | Improvement |
| ---------------------------------
| ---------------------------- | ---
--------:| -----------:|
| 1.2 GHz ARM Cortex-A53
| minio/sha256-simd (ARM64) |
638.2 MB/s | 105x |
| 2.4 GHz Intel Xeon CPU E5-2620 v3
| minio/sha256-simd (AVX2) (*) |
355.0 MB/s | 1.88x |
| 2.4 GHz Intel Xeon CPU E5-2620 v3
| minio/sha256-simd (AVX) |
306.0 MB/s | 1.62x |
| 2.4 GHz Intel Xeon CPU E5-2620 v3
On disk format
Describes each object uniquely for Erasure Code and Bitrot.
Human readable and parser friendly.
Replicated across all disks.
"parts": [ {
"etag": "7f614da9329cd3aebf59b91aadc30bf0",
...
}, ... ],
"erasure": {
"checksum": [ {
"hash": "HASH-1",
Client Tool and Libraries
Minio Client (MC)
A cross platform modern alternative to UNIX commands like ls, cp,
diff etc.
Supports filesystems and Amazon S3 compatible object storage.
Install
$ go get -u github.com/minio/mc
$ mc ls play
[2017-02-12 22:35:16 PST] 0B ferenginar/
[2017-02-12 15:08:45 PST] 0B andoria/
[2017-02-12 23:24:21 PST] 0B romulus/
Minio Client Library - Upload a local file.
package main
import (
"log"
minio "github.com/minio/minio-go"
)
func main() {
// Initialize a new s3Client.
s3Client, err := minio.New("play.minio.io:9000", "Q3AM3UQ867SPQQA43P2F",
"zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG", true)
if err != nil {
log.Fatalln(err)
Questions?
Community Channel slack.minio.io
Documentation docs.minio.io
Thank you
Harshavardhana
@y4m4

More Related Content

PPTX
Minio Cloud Storage
PPTX
Minio scale 15 x
PDF
Secret Management with Hashicorp’s Vault
PDF
MinIO January 2020 Briefing
PPT
Monitoring using Prometheus and Grafana
PDF
Ceph on arm64 upload
PDF
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
PPTX
[NDC17] Kubernetes로 개발서버 간단히 찍어내기
Minio Cloud Storage
Minio scale 15 x
Secret Management with Hashicorp’s Vault
MinIO January 2020 Briefing
Monitoring using Prometheus and Grafana
Ceph on arm64 upload
Room 3 - 6 - Nguyễn Văn Thắng & Dzung Nguyen - Ứng dụng openzfs làm lưu trữ t...
[NDC17] Kubernetes로 개발서버 간단히 찍어내기

What's hot (20)

PDF
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
PDF
EDB Postgres DBA Best Practices
 
PDF
Introduction to Docker storage, volume and image
PDF
Introduction to Vault
PDF
Apache Spark on K8S Best Practice and Performance in the Cloud
PPTX
Hashicorp Vault ppt
PPTX
Prometheus and Grafana
PDF
Using S3 Select to Deliver 100X Performance Improvements Versus the Public Cloud
PPTX
NGINX: Basics and Best Practices
PDF
Kubernetes Basics
PPTX
Ansible presentation
PDF
ProxySQL High Avalability and Configuration Management Overview
PDF
Prometheus – a next-gen Monitoring System
PDF
Getting Started with Kubernetes
PDF
Everything You wanted to Know About Distributed Tracing
PDF
Hardening Kafka Replication
PPTX
Introduction to Apache Kafka
PDF
LinuxCon 2015 Linux Kernel Networking Walkthrough
PDF
An Introduction to Kubernetes
PDF
Credential store using HashiCorp Vault
Room 2 - 3 - Nguyễn Hoài Nam & Nguyễn Việt Hùng - Terraform & Pulumi Comparin...
EDB Postgres DBA Best Practices
 
Introduction to Docker storage, volume and image
Introduction to Vault
Apache Spark on K8S Best Practice and Performance in the Cloud
Hashicorp Vault ppt
Prometheus and Grafana
Using S3 Select to Deliver 100X Performance Improvements Versus the Public Cloud
NGINX: Basics and Best Practices
Kubernetes Basics
Ansible presentation
ProxySQL High Avalability and Configuration Management Overview
Prometheus – a next-gen Monitoring System
Getting Started with Kubernetes
Everything You wanted to Know About Distributed Tracing
Hardening Kafka Replication
Introduction to Apache Kafka
LinuxCon 2015 Linux Kernel Networking Walkthrough
An Introduction to Kubernetes
Credential store using HashiCorp Vault
Ad

Similar to Minio ♥ Go (20)

PPTX
High Performance Scaling Techniques in Golang Using Go Assembly
PDF
jedgskbhtigzmcf5w5hb-signature-c5e966851270c187b6839d7cc1c16887ce7dd17b275e0d...
PPTX
Object Storage in a Cloud-Native Container Envirnoment
PPTX
Improving go-git performance
PPT
Security Applications For Emulation
PDF
Thumbnail generation using Minio's event notification.
PDF
[CB20] Reverse Engineering archeology : Reverse engineering multiple devices ...
PDF
GoSF Summerfest - Why Go at Apcera
PPTX
Mongo db - How we use Go and MongoDB by Sam Helman
PDF
GOCON Autumn (Story of our own Monitoring Agent in golang)
PDF
The Kumofs Project and MessagePack-RPC
PDF
Lavigne bsdmag-jan2012
PDF
Improving Pharo Snapshots
PPTX
FlashCache
PDF
Feasibility of Security in Micro-Controllers
PDF
Writing a TSDB from scratch_ performance optimizations.pdf
PDF
Story Writing Byte Serializer in Golang
PDF
Painless Data Storage with MongoDB & Go
PPT
Nagios Conference 2012 - Robert Bolton - Custom SNMP OID Creation
KEY
Deployment Strategies (Mongo Austin)
High Performance Scaling Techniques in Golang Using Go Assembly
jedgskbhtigzmcf5w5hb-signature-c5e966851270c187b6839d7cc1c16887ce7dd17b275e0d...
Object Storage in a Cloud-Native Container Envirnoment
Improving go-git performance
Security Applications For Emulation
Thumbnail generation using Minio's event notification.
[CB20] Reverse Engineering archeology : Reverse engineering multiple devices ...
GoSF Summerfest - Why Go at Apcera
Mongo db - How we use Go and MongoDB by Sam Helman
GOCON Autumn (Story of our own Monitoring Agent in golang)
The Kumofs Project and MessagePack-RPC
Lavigne bsdmag-jan2012
Improving Pharo Snapshots
FlashCache
Feasibility of Security in Micro-Controllers
Writing a TSDB from scratch_ performance optimizations.pdf
Story Writing Byte Serializer in Golang
Painless Data Storage with MongoDB & Go
Nagios Conference 2012 - Robert Bolton - Custom SNMP OID Creation
Deployment Strategies (Mongo Austin)
Ad

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
MYSQL Presentation for SQL database connectivity
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Chapter 3 Spatial Domain Image Processing.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Per capita expenditure prediction using model stacking based on satellite ima...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Big Data Technologies - Introduction.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
MYSQL Presentation for SQL database connectivity
NewMind AI Monthly Chronicles - July 2025
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Network Security Unit 5.pdf for BCA BBA.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Advanced methodologies resolving dimensionality complications for autism neur...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Reach Out and Touch Someone: Haptics and Empathic Computing
Chapter 3 Spatial Domain Image Processing.pdf

Minio ♥ Go

  • 1. Minio ♥ Go A Cloud Native Object Storage Harshavardhana
  • 2. What is Minio? ☕ Minio is an object storage server released under Apache License v2.0. Compatible with Amazon S3 cloud storage service. Best suited for storing photos, videos, backups and container / VM images. Size of an object can range from a few KBs to a maximum of 5TB. Is light enough to be bundled with the application stack, similar to NodeJS, Redis.
  • 3. Install Binary $ wget https://dl.minio.io/server/minio/release/linux-amd64/minio $ chmod +x minio $ ./minio version Version: 2017-01-25T03:14:52Z Release-Tag: RELEASE.2017-01-25T03-14-52Z Commit-ID: f8e4700a11065967242b8857045ce7dee607722d Docker $ docker run --name minio -p 9000:9000 minio/minio server /export Visit Docker quickstart guide for more details.
  • 4. Run Standalone FS (Filesystem) $ ./minio server /dir1 Standalone Erasure $ minio server /dir1 /dir2 /dir3 ... /dir8 Distributed Erasure $ minio server http://192.168.1.11/dir1 http://192.168.1.12/dir2 http://192.168.1.13/dir3 http://192.168.1.14/dir4 http://192.168.1.15/dir5 http://192.168.1.16/dir6 http://192.168.1.17/dir7 http://192.168.1.18/dir8 Distributed FS (Filesystem)
  • 7. Dsync (Distributed Syncing) No master node concept. Resilient applies quorum techniques. Drop-in replacement for sync.RWMutex / sync.Locker. Automatically reconnect to (restarted) nodes. Limited scalability and fixed configuration: up to 16 nodes. Will not (re)acquire any stale locks.
  • 8. Example Write Lock func lockSameResource() { // Create distributed mutex to protect resource 'test' dm := dsync.NewDRWMutex("test") dm.Lock() log.Println("first lock granted") go func() { time.Sleep(5 * time.Second) log.Println("first lock unlocked") dm.Unlock() // Unblock first lock }() log.Println("about to lock same resource again...") dm.Lock() // Waits here. log.Println("second lock granted") time.Sleep(2 * time.Second) dm.Unlock() } Visit github.com/minio/dsync for more examples.
  • 10. Data Distribution (Details) // encodeData - encodes incoming data buffer into // dataBlocks+parityBlocks returns a 2 dimensional byte array. func encodeData(dataBuffer []byte, dataBlocks, parityBlocks int) ([][]byte, error) { rs, err := reedsolomon.New(dataBlocks, parityBlocks) if err != nil { return nil, traceError(err) } // Split the input buffer into data and parity blocks. var blocks [][]byte blocks, err = rs.Split(dataBuffer) if err != nil { return nil, traceError(err) } // Encode parity blocks using data blocks. err = rs.Encode(blocks) if err != nil { return nil, traceError(err) } // Return encoded blocks. return blocks, nil }
  • 12. Bitrot (blake2b hash) SIMD accelerated pure Go implementation using Go Assembly. Three flavors: AVX2, AVX and SSE Speed up over pure go (non-assembly): 3.94x Performance comparison with other checksum techniques on AVX2. $ go test -bench=ComparisonAVX2 BenchmarkComparisonMD5-12 1000 1726121 ns/op 607.48 MB/s BenchmarkComparisonSHA1-12 500 2005164 ns/op
  • 13. Bitrot (sha256 hash) on ARM64 Used in AWS S3 payload signature verification and bitrot on GOARCH:ARM64 Speed up over pure go on ARM64: 105x | Processor | Package | Speed | Improvement | | --------------------------------- | ---------------------------- | --- --------:| -----------:| | 1.2 GHz ARM Cortex-A53 | minio/sha256-simd (ARM64) | 638.2 MB/s | 105x | | 2.4 GHz Intel Xeon CPU E5-2620 v3 | minio/sha256-simd (AVX2) (*) | 355.0 MB/s | 1.88x | | 2.4 GHz Intel Xeon CPU E5-2620 v3 | minio/sha256-simd (AVX) | 306.0 MB/s | 1.62x | | 2.4 GHz Intel Xeon CPU E5-2620 v3
  • 14. On disk format Describes each object uniquely for Erasure Code and Bitrot. Human readable and parser friendly. Replicated across all disks. "parts": [ { "etag": "7f614da9329cd3aebf59b91aadc30bf0", ... }, ... ], "erasure": { "checksum": [ { "hash": "HASH-1",
  • 15. Client Tool and Libraries
  • 16. Minio Client (MC) A cross platform modern alternative to UNIX commands like ls, cp, diff etc. Supports filesystems and Amazon S3 compatible object storage. Install $ go get -u github.com/minio/mc $ mc ls play [2017-02-12 22:35:16 PST] 0B ferenginar/ [2017-02-12 15:08:45 PST] 0B andoria/ [2017-02-12 23:24:21 PST] 0B romulus/
  • 17. Minio Client Library - Upload a local file. package main import ( "log" minio "github.com/minio/minio-go" ) func main() { // Initialize a new s3Client. s3Client, err := minio.New("play.minio.io:9000", "Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG", true) if err != nil { log.Fatalln(err)