![]() IPFS Strategy 1: Add the entire sites directory in Then I'll start thinking how we could dump the entire thing into ipfs. This will require some careful design, but I think it's worth exploring.įor now, I'm exploring integration strategies that have two copies. My long-term goal is to replace our primary fileserver + replica system to a system completely based on IPFS. ![]() Right now, we're going to implement IPFS in addition to our current system, using an asyncronous work system that copies changes over to IPFS, and then provides a hash of the added data. We looked into distributed filesystems, but they were too complex, too expensive, or didn't serve our purposes (GlusterFS for example becomes very slow when it can't find files that aren't there - it's not designed for the needs of web hosting). Once we pass the capabilities of a primary server + replica load balancing (read: when we get larger than 7TB), the plan was to implement a sharding technique. ![]() I'm not sure how it would handle billions of sites, but I expect it to work fine until we at least hit a million sites. It stores references in a B-Tree that allows for quick lookups. I was told this would not work, but XFS actually handles a lot of subdirectories in a directory pretty well. The proxy is running nginx, and translates site subdomains to the location on the fileserver ( => sites/kyledrake), so the underlying mechanism is a simple HTTP file server essentially. We have built a system that uses inotify to push file updates to the replica as they come in (allowing us to use the replica as a load balancer mirror), but this hasn't been implemented yet.Ī large XFS volume has all the sites in subdirectories of a directory called sites. This primary filesystem replicates hourly to a replica fileserver using rsync over SSH. the proxy servers can get shut down, but the fileserver can not). It also protects us against our ISP shutting down the file server in the event of complaints regarding stored content (this gives us breathing room to deal with the complaints. A proxy server (that can be turned into multiple proxy servers easily) stands between the fileserver and the public internet as a safety and scalability measure. So we're using dedicated servers with 7TB disk arrays.Ī single canonical primary fileserver stores all of the sites. We're bootstrapped, so we need to live within our means, and this system allows us to do that (it's much faster than S3 too, but I won't go there). Right now we can serve over 150TB for $100, but with these providers it would cost upwards of $15,000. ![]() The main reason is cost - bandwith is far too expensive at these providers. How Neocities Works Nowįirst, we don't use S3, GCS or any of these file storage services. It's an ongoing project (still in beta), but now's the time to start putting together a strategy for how we're going to implement it. We're starting implementation, right now. I spent a day playing with IPFS, and it blew my mind. ![]()
0 Comments
Leave a Reply. |