Giter Site home page Giter Site logo

Comments (5)

sharkAndshark avatar sharkAndshark commented on July 1, 2024 1

Hi @veschberwilli

keep_alive: 75

listen_addresses: '0.0.0.0:3000'

worker_processes: 8

cache_size_mb: 8
# Database configuration. This can also be a list of PG configs.
postgres:
  - connection_string:  postgres://postgres:postgres@localhost:5411/db
    default_srid: 4326
  - connection_string:  postgres://postgres:postgres@localhost:5422/db
    default_srid: 4326

from martin.

nyurik avatar nyurik commented on July 1, 2024 1

@veschberwilli there are two answers to your question:

  • if you have different data in two different databases, martin can publish them as two separate sources, just like @sharkAndshark showed above (thx!)
  • if you have identical data in two different databases, i.e. mirrors / replicas, and simply want to speed up tile serving because of performance or stability concerns, then no, martin does not support load balancing between multiple databases. You can still get the same result if you configure one of the standard high availability load balancers, and point Martin to it instead of going directly to the database. A quick googling gave me this blog post that mentions multiple load balancers.

from martin.

sharkAndshark avatar sharkAndshark commented on July 1, 2024 1

@veschberwilli there are two answers to your question:

  • if you have different data in two different databases, martin can publish them as two separate sources, just like @sharkAndshark showed above (thx!)

  • if you have identical data in two different databases, i.e. mirrors / replicas, and simply want to speed up tile serving because of performance or stability concerns, then no, martin does not support load balancing between multiple databases. You can still get the same result if you configure one of the standard high availability load balancers, and point Martin to it instead of going directly to the database. A quick googling gave me this blog post that mentions multiple load balancers.

Maybe we could document this under the 3.1 PostgreSQL Connection though user could find a clue in the description about configuration file.

from martin.

nyurik avatar nyurik commented on July 1, 2024

Sure, would be great, thanks!

from martin.

veschberwilli avatar veschberwilli commented on July 1, 2024

Hey @sharkAndshark and @nyurik ,
thanks a lot for the quick response and for proviing the code snippet for the config.

Helps a lot!

from martin.

Related Issues (20)

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.