简体   繁体   中英

Multiple apps on a single tomcat and postgres instance?

Currently i have set up a single instance of tomcat and postgres with multiple applications running. Which is better performance wise ? Single instance of postgres or having one instance of postgres per application ?

Shouldn't matter. Performance it depends mainly on the configuration of the Postgres instance. Prefer a single instance of Postgres, because managing two on the same machine will be harder.

It depends greatly on what those dbs are doing as to whether or not having > 1 pg instance makes sense. If they're all small, low traffic sites, then one instance is fine. If one is a large data warehouse and the other is a time sensitive transactional database, it might be best to set them up in separate clusters.

On the postgresql side, its better to have a single instance, even more if your applications share data between then.

If you need more power in the future, you can try some type of replication, like master-slave with a pg-pool redirecting read-only queries most times to slaves.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM