Ad

makara: Generic Proxy for Database Connections

Makara provides a read-write proxy and ActiveRecord adapter for managing database connections, enabling load balancing and failover.
Screenshot of instacart/makara homepage

Makara manages primary and replica database connections, offering a flexible solution for optimizing database load and ensuring high availability. It handles connection management, blacklisting failed connections, and cycling through available connections. The project introduces a database adapter that simplifies proxy implementation by focusing on SQL execution regardless of the underlying database.

Makara distinguishes itself with its robust stickiness mechanism, allowing for consistent application-replica relationships within a request. The flexible configuration system supports various load balancing strategies and connection management options. Its ActiveRecord adapter simplifies database proxying, and the clear documentation makes it relatively easy to integrate and extend.

  • Connection Pooling: Manages a pool of database connections, reducing connection overhead.
  • Read/Write Splitting: Directs read and write queries to primary and replica connections.
  • Stickiness: Maintains user sessions with specific database connections for consistent data access.
  • ActiveRecord Adapter: Simplifies database proxying for applications using ActiveRecord.
  • Blacklisting: Automatically blacklists failing connections to prevent cascading errors.
  • Flexible Configuration: Supports various load balancing strategies and connection management options.
  • Logging: Provides detailed logging of proxy operations and error handling.

Makara has been actively maintained since 2012 with regular updates and a decent level of community interaction. The clear documentation and comprehensive examples make it relatively easy to adopt. Recent commits indicate ongoing support and improvements. However, the project is seeking new maintainers to ensure long-term stability.

Developers building applications with ActiveRecord databases can benefit from Makara by improving database performance through read/write splitting and enhancing resilience with automatic failover. It reduces database load, improves application responsiveness, and provides a robust and flexible connection management solution.

Languages:
Summarize:
Share:
Stars
947
Forks
175
Issues
85
Created
13 years ago
Commit
1 year ago
License
MIT
Archived
No
Updated 7 days ago

Similar Repositories