ezrasingh / geoprox

An in-memory geospatial search engine designed for efficient real-time location-based pairing
https://ezrasingh.github.io/geoprox/docs/
Apache License 2.0
4 stars 0 forks source link

Support High Availability Clustering #5

Open ezrasingh opened 1 month ago

ezrasingh commented 1 month ago

Is your feature request related to a problem? Please describe.

The current system does not support high availability clustering, which limits its resilience and scalability.

Describe the solution you'd like

Implement high availability clustering to ensure the system remains operational and performant under heavy load or in case of node failures.

Describe alternatives you've considered

Manual failover setups and load balancing, but these are less efficient and more complex than built-in clustering support.

Additional context

Features could include:

ezrasingh commented 1 month ago

The first step toward achieving HA might be to address fault tolerance by implementing persistence, as the current setup doesn’t support it—meaning a crash would result in total data loss.

A possible solution could involve introducing state snapshots and an append-only log for operations. This would allow for some level of recovery during a failover, with configurable options for snapshot intervals.

My preference is for a memory-focused approach to persistence, where:

  1. A snapshot of the current state is taken.
  2. As operations are processed, they are logged.
  3. When the log reaches a certain size or memory threshold, a new snapshot is taken.
  4. The log file is either archived or simply discarded.
  5. The log is then flushed, and the process repeats.