{"repo":"bxcodec/dbresolver","free":true,"listed":false,"github":"https://github.com/bxcodec/dbresolver","clone":"git clone https://github.com/bxcodec/dbresolver.git","description":"Golang Database Resolver and Wrapper for any multiple database connections topology, e.g. master-slave replication database, cross-region application, and for separated ReadWrite (RW) and ReadOnly (RO) database connections","language":"Go","stars":183,"topics":["database","database-replication","global-database","go","golang","master-slave-replication","postgresql","dbresolver","mysql","postgres"],"license":"MIT","category":"databases-storage","readme_excerpt":"dbresolver Golang Database Resolver and Wrapper for any multiple database connections topology, eg. master-slave replication database, cross-region application. Idea and Inspiration This DBResolver library will split your connections to correct defined DBs. Eg, all read query will routed to ReadOnly replica db, and all write operation(Insert, Update, Delete) will routed to Primary/Master DB. Read More Items Link ------ ----- Blogpost blog post Excalidraw diagram GoSG Meetup Demo repository GoSG Presentation deck Instagram post Usecase 1: Separated RW and RO Database connection Click to Expand - You have your application deployed - Your application is heavy on read operations - Your DBs replicated to multiple replicas for faster queries - You separate the connections for optimized query - Usecase 2: Cross Region Database Click to Expand - Your application deployed to multi regions. - You have your Databases configured globally. - Usecase 3: Multi-Master (Multi-Primary) Database Click to Expand - You're using a Multi-Master database topology eg, Aurora Multi-Master - Support You can file an Issue. See documentation in Go.Dev Getting Started Download Example Implementing DB Resolver using \\ sql.DB Click to Expand Important Notes - Primary Database will be used when you call these functions - Exec - ExecContext - Begin (transaction will use primary) - BeginTx - Queries with \"RETURNING\" clause - Query - QueryContext - QueryRow - QueryRowContext - Replica Databases will be used whe","default_branch":null,"files":null,"tree":[],"storefront":"/r/bxcodec","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bxcodec/dbresolver/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}