Ncps v0.6.0: High Availability with PostgreSQL, MySQL, and Redis support

Hi everyone,

It has been exactly one year since I first announced ncps (Jan 1st, 2025). While it has been quiet on the announcement front, I’ve been actively working on it, and I am happy to share version v0.6.0.

This release marks a significant architectural milestone: ncps is now High Availability (HA) ready.

Key Changes in v0.6.0

Previous versions of ncps relied on SQLite and local locking, which restricted deployment to a single instance. With v0.6.0, I have decoupled the state and locking mechanisms to allow horizontal scaling.

  • SQL Database Support: In addition to SQLite, ncps now supports PostgreSQL and MySQL/MariaDB.
  • Distributed Locking: I have added support for Redis locking.
  • High Availability: By combining a shared SQL backend with Redis for locking, you can now run multiple replicas of ncps behind a load balancer for redundancy and scale.
  • Anonymous Analytics Reporting: Added an optional (enabled by default) analytics system with anonymous reporting capabilities.

Documentation Overhaul

The README was getting a bit too dense to ingest in one sitting, so I have completely restructured the documentation. It is now broken down into distinct sections, covering not just usage and installation, but also the architecture and internals for those interested in how it works under the hood.

Full Changelog

There are many other improvements and fixes included in this release. You can view the full comparison on GitHub: Full Changelog (v0.4.0 … v0.6.0)

Roadmap & Support

Looking ahead, I plan to work on federation between ncps clusters, content-defined chunking (CDC) storage, among others…

If you find ncps useful for your infrastructure and would like to support this roadmap, I am now accepting GitHub Sponsors.

Ready to try it out?

Head over to the GitHub repository for installation instructions, documentation, and examples: https://github.com/kalbasit/ncps

Happy building!

9 Likes

fyi, the version of ncps is currently at v0.5.2 (updated in #477912) and I’m working on updating it to v0.6.0. Also, the NixOS module is quite behind, still targeting v0.4.0 and I am working on getting it updated in https://github.com/NixOS/nixpkgs/pull/475423.

2 Likes

Nice update, the federation between ncps clusters sounds cool. I wonder how this HA update and the federation would help with nix caches distributes between machines at conferences.

You might be interested in this ongoing discussion: P2P substitution · Issue #343 · kalbasit/ncps · GitHub

2 Likes

Indeed, I have seen that issue.