0

Let's say I have 10 different applications that all have a postgresql database dependency and these applications must be deployed on Azure using Azure managed postgresql instances. Would it be best practice to create a managed database instance for each application and each environment (development, staging, production) (10 x 3 = 30 instances) or should I create one larger managed postgresql instance for each environment? That way I only have three managed database instances (dev, staging, prod)

I'm concerned about performance, security and maintainability. Overall best practices.

doct03
  • 111
  • 1

1 Answers1

0

There are pros and cons for each approach. See discusson on Should I have one MySQL instance for all our apps, or one instance for each?

I've made good experiences with a "mixed" approach:

  • development and staging can share the same instance
  • production is always on a separate instance (but maybe multiple production apps on the same instance)
  • low traffic / low usage / new apps run on a shared instance by default
  • once you face a high usage app, and/or start investigating performance issues, create a dedicated instance and move the app there
  • same for security issues or db version conflicts (two apps depending on different db version)

Generally, I don't think there's a "best practice" for all scenarios. I would start with a simple setup (i.e. only a few instances), and then improve it when needed.

claasz
  • 510
  • 3
  • 11
  • Thanks for the input. This is kind of along the lines of what I was thinking. I will probably end up going this route. – doct03 May 18 '20 at 15:08