{"repo":"krylosov-aa/pg-status","free":true,"listed":false,"github":"https://github.com/krylosov-aa/pg-status","clone":"git clone https://github.com/krylosov-aa/pg-status.git","description":"A microservice (sidecar) that helps instantly determine the status of your PostgreSQL hosts including whether they are alive, which one is the master, which ones are replicas, and how far each replica is lagging behind the master.","language":"C","stars":81,"topics":["c","master-replica","pg","postgresql","sql","microservice","sidecar","docker","high-availability","high-load"],"license":"MIT","category":"databases-storage","readme_excerpt":"pg-status An extremely lightweight and fast microservice (sidecar) that helps instantly determine the status of your PostgreSQL hosts including whether they are alive, which one is the master, which ones are replicas, and how far each replica is lagging behind the master. It’s designed as a sidecar that runs alongside your main application. It’s lightweight, resource-efficient, and delivers high performance. You can access it on every request without noticeable overhead. pg-status polls database hosts in the background at a specified interval and exposes an HTTP interface that can be used to retrieve a list of hosts meeting given conditions. It always serves data directly from memory and responds extremely quickly, so it can be safely used on every request. To learn more about why this project exists and what problem it solves, you can read the article about three PostgreSQL Master/Replica Discovery Problems Usage Run the application on the same host next to the main service or actually anywhere you want. After it starts, the HTTP API will be available. API The service provides several HTTP endpoints for retrieving host information. All APIs support two response formats: plain text and JSON. If you include the header Accept: application/json , the response will be in JSON format, for example: {\"host\": \"localhost\"} If you omit this header, the response will be plain text: localhost If the API cannot find a matching host, it will return a 404 status code. In this case, the resp","default_branch":null,"files":null,"tree":[],"storefront":"/r/krylosov-aa","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/krylosov-aa/pg-status/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."}