SeaweedTS

SeaweedTS

When you work with Kubernetes or Docker Swarm, storage is more complex than simply connecting to the local file system. When you spawn a Pod in your cluster, you need to know that you can reliably and consistently access the data.

🌐
Find the source code here: https://github.com/Nathan-Nesbitt/seaweedts or view it on the original project here: https://github.com/seaweedfs/seaweedfs/wiki/Client-Libraries

This will cause a couple of problems:

  • There is no guarantee that your pod will be running on the same node all the time.
  • If you're running in High Availability (HA), you'll likely also have multiple Pods requesting and modifying the same data.

There are many options for solving this problem, many require expensive licensing or are very complex and require a team to maintain them. One that stands out to me is SeaweedFS, which is both licensed under the Apache 2.0 license, and is rather simple to use and maintain.

SeaweedFS is a fast distributed storage system for blobs, objects, and files. It includes the following functionality:

  • Data Lakes
  • Blob Storage with O(1) disk seek
  • S3 API and Gateway
  • Cloud Tiering and Drive functionality
  • POSIX FUSE mount functionality
  • WebDAV
  • Encryption

What is SeaweedTS then?

Although all of this sounds great, the one catch is:

How do I work with this?

If you're like many engineering teams now, you're probably leveraging TypeScript. SeaweedTS is a typescript client library I implemented to interface with SeaweedFS. It allows you to interface with the following:

  • Master node management
  • Volume node management
  • S3 API interface

This allows you to use SeaweedFS within your web application, will full typing support that was not offered before. This way you can:

  • Upload files
  • Download files
  • Manage nodes