{"id":47,"date":"2026-02-08T12:29:41","date_gmt":"2026-02-08T03:29:41","guid":{"rendered":"https:\/\/www.arphile.net\/?p=47"},"modified":"2026-02-14T00:39:32","modified_gmt":"2026-02-13T15:39:32","slug":"aws-rds-%ec%99%80-connection-%ec%97%90-%eb%8c%80%ed%95%b4","status":"publish","type":"post","link":"https:\/\/www.arphile.net\/?p=47","title":{"rendered":"Aurora DB \uc640 connection \uc5d0 \ub300\ud574"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\uc774\ubc88\uc5d0 \uc791\uc5c5\ud558\uba74\uc11c \ud655\uc778\ud55c \ubd80\ubd84\uc744 \uc815\ub9ac\ud574\uc11c \ub611\uac19\uc740 \ubb38\uc81c\uac00 \ubc1c\uc0dd\ub418\uc5c8\uc744 \ub54c \uc870\uae08 \ub354 \uae30\uc5b5\ud558\uae30 \uc27d\uac8c \ud574\ubcf4\ub824\uace0 \ud55c\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AWS RDS \uc758 Aurora \ub294 Cluster database \ub2e4.<br>\uadf8\ub9ac\uace0 Cluster \uc544\ub798\uc5d0\ub294 instance \uac00 \uc788\ub2e4.<br>\uae30\ubcf8\uc801\uc73c\ub85c 2\uac1c\uc758 instance \ub97c \ub46c\uc11c \ud558\ub098\ub294 writer, \ud558\ub098\ub294 reader \ub85c \ub450\uace0, \ub354 \ub9ce\uc740 reader \ub97c \ub458 \uc218 \uc788\ub2e4. <br>\ubcf4\ud1b5 instance \ub294 \ub2e4\ub978 AZ \uc5d0 \ub450\uc5b4\uc11c \ud558\ub098\uc758 zone \uc774 \uc8fd\uc73c\uba74 \ub2e4\ub978 zone \uc5d0\uc11c \ub300\uc751\ud558\ub3c4\ub85d \ub9cc\ub4e0\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ubc88\uc5d0 \ud655\uc778\ud588\ub358 \ubd80\ubd84\uc740 Application \uc5d0\uc11c Connection pool \uc744 \ub9cc\ub4e4\uace0, \uac70\uae30\uc11c idleConnection \uc744 \uc720\uc9c0\ud560 \uacbd\uc6b0 \ubc1c\uc0dd\ub420 \uc218 \uc788\ub294 \ubb38\uc81c\uc600\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">idleConnection \uc774 Writer instance \uc5d0 \uc5f0\uacb0\ub418\uc5b4\uc788\ub294 \uc0c1\ud0dc\uc5d0\uc11c writer \uac00 \uc751\ub2f5\uc774 \uc5c6\uc5b4\uc11c reader \uac00 promote, writer \uac00 demote \ub41c \uc0c1\ud669\uc774\ub77c\uace0 \ud558\uc790. <br>\uc774\uc81c idleConnection \uc740 demote \ub41c reader \ub97c \ubc14\ub77c\ubcf4\uac8c\ub41c\ub2e4. <br>\uadf8\ub9ac\uace0 \uc11c\ube44\uc2a4\uac00 \uc0b4\uc544\ub0ac\uace0, idleConnection \uc758 lifeSpan \uc774 \uc720\uc9c0\ub418\ub294\ub3d9\uc548 reader \uc640 \ub2e4\uc2dc \uc5f0\uacb0\ub418\uc5c8\ub2e4.<br>Application \uc5d0\uc11c write query \uac00 \ubc1c\uc0dd\ub418\uba74 \uacfc\uc5f0 promote \ub41c writer \ub85c \uc5f0\uacb0\ub420\uae4c?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\uc815\ub2f5\uc740 \uc544\ub2c8\ub2e4\uc600\ub2e4.<br>\uae30\uc874 \uc5f0\uacb0\uc744 \uc720\uc9c0\ud558\uac8c\ub418\uace0, reader \ub85c \ucffc\ub9ac\ub97c \ub0a0\ub824\uc11c \uacb0\ub860\uc801\uc73c\ub85c\ub294 \ub2e4\uc74c \uc5d0\ub7ec\uac00 \ubc1c\uc0dd\ub41c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Cannot execute statement in a READ ONLY transaction.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\uc774\ub807\uac8c \ub418\ub294 \uc774\uc720\ub294 \ucc98\uc74c\uc5d0 \uc5f0\uacb0\uc744 \uc9c4\ud589\ud560\ub54c\ub294 DNS(Endpoint) \ub97c \ud1b5\ud574 ip \ub97c \ubc1b\uc544\uc640 TCP \uc5f0\uacb0\uc744 \ub9fa\uace0, <br>TCP \uac00 \uc720\uc9c0\ub41c \uc0c1\ud0dc\uc5d0\uc11c instance \uac00 failover \uac00 \ubc1c\uc0dd\ub418\ub294\uacbd\uc6b0 AWS \ub294 DNS \uc815\ubcf4\ub97c \uc5c5\ub370\uc774\ud2b8 \ud558\uc9c0\ub9cc, <br>\uc774\ubbf8 \uc5f0\uacb0\ub41c idleConnection \ub4e4\uc740 \uc218\uc815\ub418\uc9c0 \uc54a\uc740 \uc774 IP \ub97c \uc0ac\uc6a9\ud558\uae30 \ub54c\ubb38\uc774\ub2e4.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ub530\ub77c\uc11c health check \ub294 \uc880 \ub354 \uc790\uc8fc \uc9c4\ud589\ud558\ub294\uac83\uc774 \ud544\uc694\ud560\uac83\uc73c\ub85c \ubcf4\uc778\ub2e4.<br>\ub610\ub294 health check \uc2dc \ucffc\ub9ac\ub97c \ub0a0\ub824\uc11c writer instance \uc778\uc9c0 \uccb4\ud06c\ud558\ub294 \ub85c\uc9c1\uc744 \uc0ac\uc6a9\ud560 \uc218\ub3c4 \uc788\ub2e4.<br>\ucd94\ucc9c\ud558\ub294 \ucffc\ub9ac\ub294 <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT @@innodb_read_only<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc774\ubc88\uc5d0 \uc791\uc5c5\ud558\uba74\uc11c \ud655\uc778\ud55c \ubd80\ubd84\uc744 \uc815\ub9ac\ud574\uc11c \ub611\uac19\uc740 \ubb38\uc81c\uac00 \ubc1c\uc0dd\ub418\uc5c8\uc744 \ub54c \uc870\uae08 \ub354 \uae30\uc5b5\ud558\uae30 \uc27d\uac8c \ud574\ubcf4\ub824\uace0 \ud55c\ub2e4. AWS RDS \uc758 Aurora \ub294 Cluster database \ub2e4.\uadf8\ub9ac\uace0 Cluster \uc544\ub798\uc5d0\ub294 instance \uac00 \uc788\ub2e4.\uae30\ubcf8\uc801\uc73c\ub85c 2\uac1c\uc758 instance \ub97c \ub46c\uc11c \ud558\ub098\ub294 writer, \ud558\ub098\ub294 reader \ub85c \ub450\uace0, \ub354 \ub9ce\uc740 reader \ub97c \ub458 \uc218 \uc788\ub2e4. \ubcf4\ud1b5 instance \ub294 \ub2e4\ub978 AZ <a href=\"https:\/\/www.arphile.net\/?p=47\" class=\"btn btn-link continue-link\">\ub354 \uc77d\uae30<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[17],"tags":[18,19],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-17","tag-aws","tag-rds"],"_links":{"self":[{"href":"https:\/\/www.arphile.net\/index.php?rest_route=\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.arphile.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.arphile.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.arphile.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.arphile.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=47"}],"version-history":[{"count":4,"href":"https:\/\/www.arphile.net\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":54,"href":"https:\/\/www.arphile.net\/index.php?rest_route=\/wp\/v2\/posts\/47\/revisions\/54"}],"wp:attachment":[{"href":"https:\/\/www.arphile.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.arphile.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.arphile.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}