Coder Social home page Coder Social logo

postgres-flex's Introduction

GitHub release (latest by date) DeepSource

High Availability Postgres on Fly.io

This repo contains all the code and configuration necessary to run a highly available Postgres cluster in a Fly.io organization's private network. This source is packaged into Docker images which allow you to track and upgrade versions cleanly as new features are added.

Getting started

# Be sure you're running the latest version of flyctl.
fly version update

# Provision a 3 member cluster
fly pg create --name <app-name> --initial-cluster-size 3 --region ord --flex

High Availability

For HA, it's recommended that you run at least 3 members within your primary region. Automatic failovers will only consider members residing within your primary region. The primary region is represented as an environment variable defined within the fly.toml file.

Horizontal scaling

Use the clone command to scale up your cluster.

# List your active Machines
fly machines list --app <app-name>

# Clone a machine into a target region
fly machines clone <machine-id> --region <target-region>

Staying up-to-date!

This project is in active development so it's important to stay current with the latest changes and bug fixes.

# Use the following command to verify you're on the latest version.
fly image show --app <app-name>

# Update your Machines to the latest version.
fly image update --app <app-name>

TimescaleDB support

We currently maintain a separate TimescaleDB-enabled image that you can specify at provision time.

fly pg create  --image-ref flyio/postgres-flex-timescaledb:15

Having trouble?

Create an issue or ask a question here: https://community.fly.io/

Contributing

If you're looking to get involved, fork the project and send pull requests.

postgres-flex's People

Contributors

davissp14 avatar dalperin avatar lubien avatar michaeldwan avatar ederene20 avatar smorimoto avatar billyb2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.