SlideShare a Scribd company logo
SeaweedFS
Intro
2019.3
chris.lu@gmail.com
SeaweedFS Intro
● Overview
● Internal Architecture
○ Object/Blob store
○ Filer Store
○ S3/Hadoop
○ Notification/Cross-Region Replication
SeaweedFS Intro
Overview: What is special?
● Distributed
● Handles large and small files
● Optimized for large amount of small files
● Random access any file
● Low-latency access any file
● Parallel processing
Overview: APIs
● REST API for object storage
● REST/gRPC API for file system storage
● Hadoop Compatible
● FUSE client to mount file system locally
● S3 API
Architecture
● Object Storage
● File Storage
● Interface/Client Layer
Volume Store
● Based on Facebook
Haystack paper
Object Storage
Object Storage
Master
Volume
Server
Volume
Server
Volume
Server
Client Write
1. Http request file id
3. Http upload file with file id
2. Get file id
Object Storage
Object Storage
Master
Volume
Server
Volume
Server
Volume
Server
Client Write
1. Http request file id
3. Http upload file with file id
2. Get file id
Example file id, 3,01637037d6
● 3 : a volume id
● 01: file key
● 637037d6: file cookie
Object Storage
Object Storage
Master
Volume
Server
Volume
Server
Volume
Server
Client Read
1. Lookup volume id
3. Http get file with file id
2. Get volume location
● Volume locations can be cached.
● Clients can also subscribe to volume
location changes.
Object Storage
File Storage
Master
Volume
Server
Volume
Server
Volume
Server
Filer Client Upload a file to a directory
File Storage
Filer
Filer
Store
Local
MySql
Postgres
Redis
Cassandra
Metadata
Blobs
S3 API
Gateway
S3 Clients
Filer Store Data Layout
/a/b/c/ Attr
/a/b/c/def.txt Attr FileChunks
Volume-Aware Clients
Object Storage
Master
Volume
Server
Volume
Server
Volume
Server
Other SeaweedFS
Volume-Aware Clients
Metadata
File Storage
Filer
Filer
Store
Local
MySql
Postgres
Redis
Cassandra
Metadata
Blobs
Hadoop Client
Mounted FUSE Client
Volume-based data placement
● Volumes are organized with different settings:
○ Collection
■ TTL
■ Replication
● Master randomly assigns a write request to one of the writable volumes.
● Strong consistent writes to all replicas.
● If one replica fails heartbeat, the master marks the volume id as read-only.
● Writes should be assigned to other writable volumes.
Object Storage
Security: per object access control with JWT
Master
Volume
Server
Volume
Server
Volume
Server
Client
1. Request FileId
3. Upload File with FileId + JWT
2. Get FileId + JWT
● A Json Web Token (JWT) has permission
to create/update/delete a file.
● Expires after 10 seconds.
Secure Volume Server
● Mutual TLS
○ Secure master to volume server admin
operations
● JWT
○ Secure object changes
Volume servers can be placed anywhere.
Any server with some free space can be a
volume server.
Master
Volume
Server
Volume
Server
Volume
Server
Mutual TLS gRPC calls
JWT authorized changes
High Availability: Master Server Object Storage
Master
Volume
Server
Volume
Server
Volume
Server
Master
Master
● Multi-Master cluster
● Leader election with Raft consensus
algorithm
High Availability: Filer Server
● Multiple stateless filer servers
● Shared filer store could be any
HA storage solution.
File Storage
Filer
Filer Store
MySql
Postgres
Redis
Cassandra
Filer Filer
Scalability: Filer
● Direct blob access.
● Filer store can be any proven store, and simple to add new store:
○ Redis
○ MySql/Postgres
○ Cassandra
○ Interface for any key-value store
● Unlimited files under one directory.
● Blob storage supports multiple filers.
File Change Notification
● All filer change notifications can
be sent to a message queue.
● Protobuf encoded notification.
● Cross-Region replication is built
on top of this.
File Storage
Filer
Filer
Store
Local
MySql
Postgres
Redis
Cassandra
Metadata
Message
Queue
notifications
Kafka
AWS SNS/SQS,
Azure Service Bus,
Google Pub/Sub,
NATS and RabbitMQ
Atomicity
Operation Atomicity Note
Creating a file yes
Deleting a file yes
Renaming a file Yes with mysql/postgres.
No with
redis/leveldb/cassandra.
Implemented via database
transactions.
Renaming a directory Yes with mysql/postgres.
No with
redis/leveldb/cassandra.
Implemented via database
transactions.
Creating a single directory with
mkdir()
yes
Recursive directory deletion No
Comparing to HDFS
HDFS SeaweedFS
File Metadata Storage Single namenode Multiple stateless filers with
proven scalable filer store,
redis/cassandra/etc.
Storing small files Not recommended. Optimized for small files.
Parallel data access Yes Yes
Hadoop Compatible Yes Yes. (Atomic rename via
database transactions.)
Comparing to CEPH
CEPH SeaweedFS
Data Placement CRUSH maps of the whole
cluster, rather complicated,
especially when adding
storage.
Calculated for each object.
Volume level placement,
amortized for each object.
Storing small files Not optimized. Optimized for small files.
Scaling file system metadata MDS dynamically partition
subtree
Flat and linearly scalable.
Easy to set up Mixed reviews Yes
Design Philosophy
● Scale up each layer independently.
● Batch small files
○ Data placement (CEPH file-level, SeaweedFS volume-level)
○ Tracking (HDFS namenode track blocks, SeaweedFS track volume locations)
○ Easy move/delete/replicate operation.
Open APIs
● gRPC APIs for admin operations
● HTTP APIs for uploading and serving blobs
● gRPC for filer metadata operations
● Protocol buffer defined metadata
Future Plan
● Volume Server
○ Async Replica
○ Erasure Coding
○ Tiered Storage
● Integration
○ CSI, docker volume plugin
○ Kerberos
● Tools
○ Auto Balance
Open APIs for possible extensions
● Build a different filer with striping.
● Build a different replication
● Admin tools
● Custom Encryption
● Async Operations
○ Search
○ Secondary index
● Local cache for cloud files
● CDN

More Related Content

What's hot

Ceph and RocksDB
Ceph and RocksDBCeph and RocksDB
Ceph and RocksDBSage Weil
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Henning Jacobs
 
A crash course in CRUSH
A crash course in CRUSHA crash course in CRUSH
A crash course in CRUSHSage Weil
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017 Karan Singh
 
Achieve Extreme Simplicity and Superior Price/Performance with Greenplum Buil...
Achieve Extreme Simplicity and Superior Price/Performance with Greenplum Buil...Achieve Extreme Simplicity and Superior Price/Performance with Greenplum Buil...
Achieve Extreme Simplicity and Superior Price/Performance with Greenplum Buil...VMware Tanzu
 
Ceph Performance and Sizing Guide
Ceph Performance and Sizing GuideCeph Performance and Sizing Guide
Ceph Performance and Sizing GuideJose De La Rosa
 
Ceph Block Devices: A Deep Dive
Ceph Block Devices:  A Deep DiveCeph Block Devices:  A Deep Dive
Ceph Block Devices: A Deep DiveRed_Hat_Storage
 
Apache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic DatasetsApache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic DatasetsAlluxio, Inc.
 
Minio Cloud Storage
Minio Cloud StorageMinio Cloud Storage
Minio Cloud StorageMinio
 
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideKaran Singh
 
Ceph scale testing with 10 Billion Objects
Ceph scale testing with 10 Billion ObjectsCeph scale testing with 10 Billion Objects
Ceph scale testing with 10 Billion ObjectsKaran Singh
 
Multiple Sites and Disaster Recovery with Ceph: Andrew Hatfield, Red Hat
Multiple Sites and Disaster Recovery with Ceph: Andrew Hatfield, Red HatMultiple Sites and Disaster Recovery with Ceph: Andrew Hatfield, Red Hat
Multiple Sites and Disaster Recovery with Ceph: Andrew Hatfield, Red HatOpenStack
 
Apache Hudi: The Path Forward
Apache Hudi: The Path ForwardApache Hudi: The Path Forward
Apache Hudi: The Path ForwardAlluxio, Inc.
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyAlexander Kukushkin
 
Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph Community
 

What's hot (20)

Ceph and RocksDB
Ceph and RocksDBCeph and RocksDB
Ceph and RocksDB
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
 
A crash course in CRUSH
A crash course in CRUSHA crash course in CRUSH
A crash course in CRUSH
 
Ceph Introduction 2017
Ceph Introduction 2017  Ceph Introduction 2017
Ceph Introduction 2017
 
Achieve Extreme Simplicity and Superior Price/Performance with Greenplum Buil...
Achieve Extreme Simplicity and Superior Price/Performance with Greenplum Buil...Achieve Extreme Simplicity and Superior Price/Performance with Greenplum Buil...
Achieve Extreme Simplicity and Superior Price/Performance with Greenplum Buil...
 
Ceph Performance and Sizing Guide
Ceph Performance and Sizing GuideCeph Performance and Sizing Guide
Ceph Performance and Sizing Guide
 
DAOS Middleware overview
DAOS Middleware overviewDAOS Middleware overview
DAOS Middleware overview
 
Ceph Block Devices: A Deep Dive
Ceph Block Devices:  A Deep DiveCeph Block Devices:  A Deep Dive
Ceph Block Devices: A Deep Dive
 
Apache Hadoop 3
Apache Hadoop 3Apache Hadoop 3
Apache Hadoop 3
 
Apache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic DatasetsApache Iceberg - A Table Format for Hige Analytic Datasets
Apache Iceberg - A Table Format for Hige Analytic Datasets
 
Minio Cloud Storage
Minio Cloud StorageMinio Cloud Storage
Minio Cloud Storage
 
Bluestore
BluestoreBluestore
Bluestore
 
Ceph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing GuideCeph Object Storage Reference Architecture Performance and Sizing Guide
Ceph Object Storage Reference Architecture Performance and Sizing Guide
 
Node Labels in YARN
Node Labels in YARNNode Labels in YARN
Node Labels in YARN
 
Ceph scale testing with 10 Billion Objects
Ceph scale testing with 10 Billion ObjectsCeph scale testing with 10 Billion Objects
Ceph scale testing with 10 Billion Objects
 
Multiple Sites and Disaster Recovery with Ceph: Andrew Hatfield, Red Hat
Multiple Sites and Disaster Recovery with Ceph: Andrew Hatfield, Red HatMultiple Sites and Disaster Recovery with Ceph: Andrew Hatfield, Red Hat
Multiple Sites and Disaster Recovery with Ceph: Andrew Hatfield, Red Hat
 
Apache Hudi: The Path Forward
Apache Hudi: The Path ForwardApache Hudi: The Path Forward
Apache Hudi: The Path Forward
 
Upgrading HDFS to 3.3.0 and deploying RBF in production #LINE_DM
Upgrading HDFS to 3.3.0 and deploying RBF in production #LINE_DMUpgrading HDFS to 3.3.0 and deploying RBF in production #LINE_DM
Upgrading HDFS to 3.3.0 and deploying RBF in production #LINE_DM
 
Patroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easyPatroni - HA PostgreSQL made easy
Patroni - HA PostgreSQL made easy
 
Ceph RBD Update - June 2021
Ceph RBD Update - June 2021Ceph RBD Update - June 2021
Ceph RBD Update - June 2021
 

Similar to SeaweedFS introduction

Glusterfs and openstack
Glusterfs  and openstackGlusterfs  and openstack
Glusterfs and openstackopenstackindia
 
Beyond the File System - Designing Large Scale File Storage and Serving
Beyond the File System - Designing Large Scale File Storage and ServingBeyond the File System - Designing Large Scale File Storage and Serving
Beyond the File System - Designing Large Scale File Storage and Servingmclee
 
Filesystems
FilesystemsFilesystems
Filesystemsroyans
 
Data Analytics presentation.pptx
Data Analytics presentation.pptxData Analytics presentation.pptx
Data Analytics presentation.pptxSwarnaSLcse
 
OSDC 2015: John Spray | The Ceph Storage System
OSDC 2015: John Spray | The Ceph Storage SystemOSDC 2015: John Spray | The Ceph Storage System
OSDC 2015: John Spray | The Ceph Storage SystemNETWAYS
 
Lisa 2015-gluster fs-introduction
Lisa 2015-gluster fs-introductionLisa 2015-gluster fs-introduction
Lisa 2015-gluster fs-introductionGluster.org
 
Hadoop and object stores can we do it better
Hadoop and object stores  can we do it betterHadoop and object stores  can we do it better
Hadoop and object stores can we do it bettergvernik
 
Hadoop and object stores: Can we do it better?
Hadoop and object stores: Can we do it better?Hadoop and object stores: Can we do it better?
Hadoop and object stores: Can we do it better?gvernik
 
Distributed Filesystems Review
Distributed Filesystems ReviewDistributed Filesystems Review
Distributed Filesystems ReviewSchubert Zhang
 
Web20expo Filesystems
Web20expo FilesystemsWeb20expo Filesystems
Web20expo Filesystemsroyans
 
Web20expo Filesystems
Web20expo FilesystemsWeb20expo Filesystems
Web20expo Filesystemsroyans
 
Beyond the File System: Designing Large-Scale File Storage and Serving
 	Beyond the File System: Designing Large-Scale File Storage and Serving 	Beyond the File System: Designing Large-Scale File Storage and Serving
Beyond the File System: Designing Large-Scale File Storage and Servingmclee
 
Web20expo Filesystems
Web20expo FilesystemsWeb20expo Filesystems
Web20expo Filesystemsguest18a0f1
 
Web20expo Filesystems
Web20expo FilesystemsWeb20expo Filesystems
Web20expo Filesystemsroyans
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1sprdd
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1sprdd
 

Similar to SeaweedFS introduction (20)

Glusterfs and openstack
Glusterfs  and openstackGlusterfs  and openstack
Glusterfs and openstack
 
Beyond the File System - Designing Large Scale File Storage and Serving
Beyond the File System - Designing Large Scale File Storage and ServingBeyond the File System - Designing Large Scale File Storage and Serving
Beyond the File System - Designing Large Scale File Storage and Serving
 
Filesystems
FilesystemsFilesystems
Filesystems
 
Data Analytics presentation.pptx
Data Analytics presentation.pptxData Analytics presentation.pptx
Data Analytics presentation.pptx
 
OSDC 2015: John Spray | The Ceph Storage System
OSDC 2015: John Spray | The Ceph Storage SystemOSDC 2015: John Spray | The Ceph Storage System
OSDC 2015: John Spray | The Ceph Storage System
 
Lisa 2015-gluster fs-introduction
Lisa 2015-gluster fs-introductionLisa 2015-gluster fs-introduction
Lisa 2015-gluster fs-introduction
 
Apache Hadoop HDFS
Apache Hadoop HDFSApache Hadoop HDFS
Apache Hadoop HDFS
 
Hadoop and object stores can we do it better
Hadoop and object stores  can we do it betterHadoop and object stores  can we do it better
Hadoop and object stores can we do it better
 
Hadoop and object stores: Can we do it better?
Hadoop and object stores: Can we do it better?Hadoop and object stores: Can we do it better?
Hadoop and object stores: Can we do it better?
 
Distributed Filesystems Review
Distributed Filesystems ReviewDistributed Filesystems Review
Distributed Filesystems Review
 
Hadoop data management
Hadoop data managementHadoop data management
Hadoop data management
 
Hadoop and HDFS
Hadoop and HDFSHadoop and HDFS
Hadoop and HDFS
 
Web20expo Filesystems
Web20expo FilesystemsWeb20expo Filesystems
Web20expo Filesystems
 
Web20expo Filesystems
Web20expo FilesystemsWeb20expo Filesystems
Web20expo Filesystems
 
Beyond the File System: Designing Large-Scale File Storage and Serving
 	Beyond the File System: Designing Large-Scale File Storage and Serving 	Beyond the File System: Designing Large-Scale File Storage and Serving
Beyond the File System: Designing Large-Scale File Storage and Serving
 
Web20expo Filesystems
Web20expo FilesystemsWeb20expo Filesystems
Web20expo Filesystems
 
Web20expo Filesystems
Web20expo FilesystemsWeb20expo Filesystems
Web20expo Filesystems
 
Hdfs internals
Hdfs internalsHdfs internals
Hdfs internals
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1
 
Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1
 

Recently uploaded

SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAlluxio, Inc.
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Krakówbim.edu.pl
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024Ortus Solutions, Corp
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfAMB-Review
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessWSO2
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfkalichargn70th171
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfOrtus Solutions, Corp
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesKrzysztofKkol1
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILNatan Silnitsky
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptxGeorgi Kodinov
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfMeon Technology
 

Recently uploaded (20)

SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Agnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in KrakówAgnieszka Andrzejewska - BIM School Course in Kraków
Agnieszka Andrzejewska - BIM School Course in Kraków
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 

SeaweedFS introduction

  • 2. SeaweedFS Intro ● Overview ● Internal Architecture ○ Object/Blob store ○ Filer Store ○ S3/Hadoop ○ Notification/Cross-Region Replication
  • 4.
  • 5. Overview: What is special? ● Distributed ● Handles large and small files ● Optimized for large amount of small files ● Random access any file ● Low-latency access any file ● Parallel processing
  • 6. Overview: APIs ● REST API for object storage ● REST/gRPC API for file system storage ● Hadoop Compatible ● FUSE client to mount file system locally ● S3 API
  • 7. Architecture ● Object Storage ● File Storage ● Interface/Client Layer
  • 8. Volume Store ● Based on Facebook Haystack paper
  • 9. Object Storage Object Storage Master Volume Server Volume Server Volume Server Client Write 1. Http request file id 3. Http upload file with file id 2. Get file id
  • 10. Object Storage Object Storage Master Volume Server Volume Server Volume Server Client Write 1. Http request file id 3. Http upload file with file id 2. Get file id Example file id, 3,01637037d6 ● 3 : a volume id ● 01: file key ● 637037d6: file cookie
  • 11. Object Storage Object Storage Master Volume Server Volume Server Volume Server Client Read 1. Lookup volume id 3. Http get file with file id 2. Get volume location ● Volume locations can be cached. ● Clients can also subscribe to volume location changes.
  • 12. Object Storage File Storage Master Volume Server Volume Server Volume Server Filer Client Upload a file to a directory File Storage Filer Filer Store Local MySql Postgres Redis Cassandra Metadata Blobs S3 API Gateway S3 Clients
  • 13. Filer Store Data Layout /a/b/c/ Attr /a/b/c/def.txt Attr FileChunks
  • 14. Volume-Aware Clients Object Storage Master Volume Server Volume Server Volume Server Other SeaweedFS Volume-Aware Clients Metadata File Storage Filer Filer Store Local MySql Postgres Redis Cassandra Metadata Blobs Hadoop Client Mounted FUSE Client
  • 15. Volume-based data placement ● Volumes are organized with different settings: ○ Collection ■ TTL ■ Replication ● Master randomly assigns a write request to one of the writable volumes. ● Strong consistent writes to all replicas. ● If one replica fails heartbeat, the master marks the volume id as read-only. ● Writes should be assigned to other writable volumes.
  • 16. Object Storage Security: per object access control with JWT Master Volume Server Volume Server Volume Server Client 1. Request FileId 3. Upload File with FileId + JWT 2. Get FileId + JWT ● A Json Web Token (JWT) has permission to create/update/delete a file. ● Expires after 10 seconds.
  • 17. Secure Volume Server ● Mutual TLS ○ Secure master to volume server admin operations ● JWT ○ Secure object changes Volume servers can be placed anywhere. Any server with some free space can be a volume server. Master Volume Server Volume Server Volume Server Mutual TLS gRPC calls JWT authorized changes
  • 18. High Availability: Master Server Object Storage Master Volume Server Volume Server Volume Server Master Master ● Multi-Master cluster ● Leader election with Raft consensus algorithm
  • 19. High Availability: Filer Server ● Multiple stateless filer servers ● Shared filer store could be any HA storage solution. File Storage Filer Filer Store MySql Postgres Redis Cassandra Filer Filer
  • 20. Scalability: Filer ● Direct blob access. ● Filer store can be any proven store, and simple to add new store: ○ Redis ○ MySql/Postgres ○ Cassandra ○ Interface for any key-value store ● Unlimited files under one directory. ● Blob storage supports multiple filers.
  • 21. File Change Notification ● All filer change notifications can be sent to a message queue. ● Protobuf encoded notification. ● Cross-Region replication is built on top of this. File Storage Filer Filer Store Local MySql Postgres Redis Cassandra Metadata Message Queue notifications Kafka AWS SNS/SQS, Azure Service Bus, Google Pub/Sub, NATS and RabbitMQ
  • 22.
  • 23. Atomicity Operation Atomicity Note Creating a file yes Deleting a file yes Renaming a file Yes with mysql/postgres. No with redis/leveldb/cassandra. Implemented via database transactions. Renaming a directory Yes with mysql/postgres. No with redis/leveldb/cassandra. Implemented via database transactions. Creating a single directory with mkdir() yes Recursive directory deletion No
  • 24. Comparing to HDFS HDFS SeaweedFS File Metadata Storage Single namenode Multiple stateless filers with proven scalable filer store, redis/cassandra/etc. Storing small files Not recommended. Optimized for small files. Parallel data access Yes Yes Hadoop Compatible Yes Yes. (Atomic rename via database transactions.)
  • 25. Comparing to CEPH CEPH SeaweedFS Data Placement CRUSH maps of the whole cluster, rather complicated, especially when adding storage. Calculated for each object. Volume level placement, amortized for each object. Storing small files Not optimized. Optimized for small files. Scaling file system metadata MDS dynamically partition subtree Flat and linearly scalable. Easy to set up Mixed reviews Yes
  • 26. Design Philosophy ● Scale up each layer independently. ● Batch small files ○ Data placement (CEPH file-level, SeaweedFS volume-level) ○ Tracking (HDFS namenode track blocks, SeaweedFS track volume locations) ○ Easy move/delete/replicate operation.
  • 27. Open APIs ● gRPC APIs for admin operations ● HTTP APIs for uploading and serving blobs ● gRPC for filer metadata operations ● Protocol buffer defined metadata
  • 28. Future Plan ● Volume Server ○ Async Replica ○ Erasure Coding ○ Tiered Storage ● Integration ○ CSI, docker volume plugin ○ Kerberos ● Tools ○ Auto Balance
  • 29. Open APIs for possible extensions ● Build a different filer with striping. ● Build a different replication ● Admin tools ● Custom Encryption ● Async Operations ○ Search ○ Secondary index ● Local cache for cloud files ● CDN