Wetopi Infrastructure Series Posts
Can you imagine an infinitely scalable storage?
It’s no longer a dream, it’s a reality!
Data storage is THE ISSUE of this century.
We realised that already back in 2015, when we moved Wetopi to a scalable infrastructure.
Since the beginning of the 21st century people have started using technology in every aspect of life, adopting it more and more in order to make their lives easier.
With this increased use, the demand to store and preserve the user data has also increased exponentially.
You use your phone to take pics, and to treasure these memories, upload them to web enabled storage like Google photos, for instance.
At the end of 2017 Google announced that over 1.2 billion photos were uploaded to the service every day, with the grand total of all uploaded content measuring over 13.7 petabytes of storage.
For comparison, at the end of 2017, the entire Internet Archive held almost 40 petabytes.
This example will help you to have an idea of the kind of data store these companies might be using.
With these figures you can imagine that data storage solutions needed to evolve to accommodate this ever-growing need for flexible and scalable storage resource.
Storage in single bare metal servers is fast and easy, you choose a fast SSD (solid-store drive) and voila!
The problem with bare metal servers is that they need maintenance which also implies downtime and they are not easily scalable.
Distributed storage, the solution.
But what is distributed data storage?
Let’s check Wikipedia to give you a clear definition:
“A distributed data storage is a computer network where information is stored on more than one node, often in a replicated fashion. It is usually specifically used to refer to either a distributed database where users store information on a number of nodes, or a computer network in which users store information on a number of peer network nodes.”Wikipedia
Imagine a bunch of bare metal servers on a network (named cluster), with virtualization software that lets you easily create Virtual Machines.
Virtualization software allows you to run two or more operating systems using only one PC. So it’s like two (or more) computers in one.
Distributed storage lets you attach your data to a virtual server, and the best thing is that you can change your virtual server in size, placement, operating system, etc.
In a nutshell, distributed data storage means that your data volume can be instantly moved from one location to another.
Why you should trust distributed storage?
In the past, portable, fast, and scalable storage was usually provided with a traditional SAN (Storage Area Network). These huge storage systems were expensive and difficult to manage and upgrade.
Scaling and upgrading was difficult, and the architecture was susceptible to considerable vendor lock-in or parts obsolescence.
In the past 15 years since the distributed storage alternative appeared, it has steadily grown in popularity, performance, stability, scalability, and features.
Distributed storage usually implies redundancy, and this gives us the advantage of reading from multiple sources at the same time.
The idea behind “distributed” is to give you the advantage of using a multitude of standard servers, which behave as one huge virtual storage system.
“Storage is the fundamental enabler of civilization. Writing (the first form of storage) enabled civilization. Digital storage enables digital civilization.”Robin Harris from StorageMojo.
Our pick: Ceph
We have intensively tested and analysed different distributed storage solutions.
And we came to the conclusion that Ceph is an incredible beast! After some months of testing we were really impressed!
Ceph is THE leading open-source software-defined storage solution on the market, with countless supporters from research data centres of every size and industry.
Some of the reasons Ceph is such an ideal solution are that it’s flexible, inexpensive, fault-tolerant, hardware neutral, and infinitely scalable which makes it an excellent choice for organisations of any size.
Ceph’s algorithm, CRUSH, liberates storage clusters from the scalability and performance limitations imposed by centralised data devices.
CRUSH replicates and rebalances data within the cluster dynamically—eliminating this tedious task for administrators, while delivering high-performance and infinite scalability.
Ceph is the result of hundreds of contributors and organisations working together in the best practices of Open Source. Some of these organisations are Intel, Fujitsu, Sandisk, just to name but a few.
Ceph distributed storage benefits
As we mentioned before Ceph is flexible, inexpensive, fault-tolerant, hardware neutral, and infinitely scalable. On top of all this Ceph provides us with:
- Support for multiple storage types: object, block, and file systems. Regardless of the type of work being carried out, the resulting files, blocks and/or objects can all live in harmony in Ceph.
- Natively supporting hybrid cloud environments.
- Open-source software – Freedom from vendor lock-in and product obsolescence
- Fault tolerance: there’s no need to buy redundant hardware in the event a component fails. Ceph’s self-healing functionality quickly replicates the failed node, ensuring high availability and data redundancy.
The only down side of Ceph is that it’s extraordinarily complicated to run correctly. In other words, to take advantage of such an amazing tool you need a deep understanding of Ceph.
We’ll try to sum up as clearly as possible how we work with Ceph.
Wetopi Ceph infrastructure
At Wetopi all Virtual Machine Clusters consume storage simultaneously from 2 pools.
- SATA (Serial Advanced Technology Attachment storage: storage based on multiple SATA disks), the “non-performant” pool.
This pool of storage is consumed in infrastructure servers with tasks that don’t require massive performance.
- The SSD “the performant”. Based on an aggregate of Solid Storage Disks. This pool provides storage to all virtual machines used by the WordPress end user and all infrastructure virtual machines requiring massive performance.
Your data is saved 3 times
Both pools are configured to store the data in replica 3. This way, in the virtually impossible event that one or even two servers storing would break some of your WordPress objects, nothing would stop or get lost.
With 3 copies of your objects your work is secure!
Let’s see what happens with your data when you save something on WordPress working with Ceph:
- The data goes to the SSD pool and the CRUSH algorithm breaks it assigning different pieces of data to different Placement Groups.
- The Placement Group uses the CRUSH algorithm to send your data to the primary OSD (Object Storage Daemon).
- The Primary OSD replicates the Placement Group to the second and third OSD
- When your server receives the “write” confirmation from Primary and Secondary ODS, then your data is considered “safe”.
Leading the Ceph integration with Docker Swarm
Your WordPress servers at Wetopi are containerized using Docker.
Docker Swarm is a cluster orchestrator. It’s in charge of maintaining your WordPress server alive. If your server stops due to a problem:
- The orchestrator will try to rescue your service.
- If service fails due to a problem on its current placement, it looks for a new physical placement, moving your server to a new functional node.
To let the Docker orchestrate and freely move your server around the cluster, Docker has to be capable of managing your storage volumes.
To do this efficiently, we developed our own Docker storage Driver.
We didn’t find the perfect storage driver, so we created it!
Do you want to know why?
- Docker is a platform in constant evolution. We wanted a storage plugin capable or running with the latest docker releases.
- The existing RBD volume drivers (RADOS Block Device) were old and had lots of other software dependencies. Our goal was to have a lightweight and fast driver
Here you have the link to download our Docker Swarm RBD plugin https://github.com/wetopi/docker-volume-rbd
This driver is under MIT License so you can use it for free or contribute!
We hope that after having read this post you have a better idea about how distributed storage work and why is THE solution to the storage issue.
Let us know in the comments if you still have questions about it. We’ll be happy to help!
At wetopi, we want to minimize the friction that every professional face when working and hosting WordPress projects.
In short, we are just techies passionate about WordPress. With wetopi, a specialized WordPress hosting, we want to go further to offer professionals and agencies a platform to work efficiently and effectively.
Not a wetopi user?
Free full performance servers for your development and test.
No credit card required.
Wetopi Infrastructure Series Posts
- Building a competitive hosting Infrastructure
- Wetopi infrastructure Layers design.
- Private cloud- VMs Host orchestration (abstraction from the bare-metal hosts)
- Scalable and distributed Storage. (CEPH)
- L4/L7 Load Balancing
- Node and Service discovery.
- Elasticsearch everywhere.
- Advanced auto-filling WAF (firewall)
- Domain Design Driven and Microservices Architecture.
- CI/CD (Continuous Integration And Delivery system) our peace of mind