Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0BD5-0000JW-QU for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 20:58:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i0BD4-00015Y-Li for pgsql-general@arkaria.postgresql.org; Tue, 20 Aug 2019 20:58:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0BD4-00015Q-CE for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2019 20:58:30 +0000 Received: from mail.hjp.at ([212.17.106.138] helo=rorschach.hjp.at) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i0BCw-0000Jp-LM for pgsql-general@lists.postgresql.org; Tue, 20 Aug 2019 20:58:30 +0000 Received: by rorschach.hjp.at (Postfix, from userid 1000) id 3F5445E; Tue, 20 Aug 2019 22:58:21 +0200 (CEST) Date: Tue, 20 Aug 2019 22:58:21 +0200 From: "Peter J. Holzer" To: pgsql-general@lists.postgresql.org Subject: Re: Databases and servers Message-ID: <20190820205821.GA20575@hjp.at> References: <1566297353973.84310@TechMahindra.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: <1566297353973.84310@TechMahindra.com> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019-08-20 10:33:17 +0000, Karl Martin Skoldebrand wrote: > I just discovered that a client has done this: >=20 > They have two web applications A1 and A2. They have seperate hostnames/UR= Ls. > Both have a production and a test database A1p and A1t/ A2p and A2t. >=20 > What they've done is have both A1p and A2p on the same actual databaser s= erver > and A1t and A2t on the same server. >=20 > So, I'm thinking - if a bug in application A1 crashes the application and > database badly it will risk bringing down both services A1 and A2. The sa= me > risk would be evident on a successful security breach. >=20 > I would prefer to A1p and A2p on seperate servers, maybe keeping A1t and = A2t on > the same. (This is what seems to be happening when the database servers a= re > being repladed). On rereading this I notice that I'm not sure what that means. If you propose replacing the two servers with three (two production, one test) or even four (two production and two test), I agree. If you want to keep two servers, but rearrange them so that one server has both the production and the test database for each app on the same server, see below. > What is the general thought on the current setup? Without knowing the details I think I would side with your client here: It seems to me that the risk of accidentally clobbering a production database which is in the same host as the test database is higher than the risk of two different production databases interfering with each other. Also, if you have the test and production database on the same host, there are some procedures which you can't safely test (e.g. an OS upgrade). I would think about putting each database in virtual machine or at least a container, though. hp --=20 _ | Peter J. Holzer | we build much bigger, better disasters now |_|_) | | because we have much more sophisticated | | | hjp@hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEETtJbRjyPwVTYGJ5k8g5IURL+KF0FAl1cXugACgkQ8g5IURL+ KF0uhBAApQUAHueAQs+MiLRns8loyDDvZYJ9Hkf6wh7YvjNjNv0l5CWkrcScBtgB ekZEeIuHIc6tG5wrWxY+visZHquxt4xt5j6rjnqVkw3/bOFzbFnuj193E+bfTN/k MWe+2FsBs5F8y9d4SdMkPGs4AY6s8SddDg4B8veOV/E9VMq9Leiv9qyKov8mySTP Yn32+3w1PvyPQSPbl2SGmMf88Lp6I7hV+6+EQvM8AoDRUHmbEQyHOGNQ9zmwepKg mKOIm1IJePMh4TGMwnai/B8cG6ZESwoY5NuzSBmx5TNanzw3y1DEeuJ8jwCl9mkf YC/VSrM9SIv/MpLeGcXI7w5FUQne/nWEzo6ySkRHYxtnsJFEfFgNXeGHIU4vH7ij 5jRWAnHV13qyHfPSr/WDczxv8nDNQL8tQNETyD8HWSuqR2ayncLlCnOHZxqRPSw2 uK8sXZdywGZoOnczkJmIRiiXnV7uCs7X/fargJezNDOIQddVI/Zs1A4+hwfgsYB7 OCpCx4l1tY5Br6JC+E9Hwjvxe9McJQQfSo2yAlRB8IgIjqbaNBTq598JwBQQZOkS Fj17Jjn7WEev/wAySGwyoShu/t+49T+PRxOxPanVFFr4fQFNd00iFjIsyRcmpUEZ HzF4icNBVvzWhWwVtacXbU5W5bELu/9v8qAjw1JrhmEUeFLsZLU= =ifGv -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz--