<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>장애없이, 매일 놀아 봅시다.</title>
    <link>https://wowpanel.tistory.com/</link>
    <description>장애 예방이 최선, 발생했다면 원인 찾고 해결하고, 재발 방지!!!
</description>
    <language>ko</language>
    <pubDate>Wed, 9 Sep 2026 17:28:09 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>와우패널</managingEditor>
    <image>
      <title>장애없이, 매일 놀아 봅시다.</title>
      <url>https://tistory1.daumcdn.net/tistory/8532368/attach/53698a64a89e48008eac53aeb79d9f86</url>
      <link>https://wowpanel.tistory.com</link>
    </image>
    <item>
      <title>certificate has expired &amp;mdash; 인증서 만료, 장애 하루 전 신호</title>
      <link>https://wowpanel.tistory.com/entry/certificate-has-expired-%E2%80%94-%EC%9D%B8%EC%A6%9D%EC%84%9C-%EB%A7%8C%EB%A3%8C-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;앞선 네 편은 전부 &quot;서서히 소진되는&quot; 자원이었습니다 &amp;mdash; inode&amp;middot;fd&amp;middot;포트&amp;middot;재시작 횟수 전부 오늘 얼마나 찼는지가 계속 바뀌었습니다. 인증서 만료는 다릅니다. &lt;b&gt;만료일은 인증서를 발급하는 순간 이미 정해져 있고, 그날 그 시각까지는 아무 경고 없이 멀쩡하다가 그 순간을 넘기면 즉시, 예외 없이 끊깁니다.&lt;/b&gt; 이 글은 그 날짜를 오늘 어떻게 확인하는지, 리프 인증서만 보고 안심하면 안 되는 이유를 실측으로 확인하고, 실제로 만료된 인증서로 접속이 끊기는 걸 재현합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;월요일 오전, 파트너사 연동 API&lt;/b&gt; &amp;mdash; 외부 파트너가 우리 API를 호출하는 게 자정 넘어서부터 전부 실패한다고 연락이 왔다. 우리 쪽 API 서버는 재시작한 적도 없고 로그도 조용했다. 원인은 리프 인증서가 아니라 &lt;b&gt;체인 중간에 있는 중간(intermediate) 인증서&lt;/b&gt;가 그 시각에 만료된 것이었다. 리프 인증서의 유효기간만 확인하고 있었기 때문에, 아무도 이 만료를 미리 보지 못했다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;인증서 만료는 이 시리즈에서 가장 확정적인 신호입니다 &amp;mdash; 날짜가 이미 정해져 있으니 &quot;재현마다 값이 흔들린다&quot;는 걱정이 없습니다. 그런데도 매년 반복되는 장애 유형이라는 게, 이 신호를 어떻게 놓치는지 살펴볼 이유입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;측정 환경: Rocky Linux 9.7(커널 5.14.0-611.47.1.el9_7) &amp;middot; OpenSSL 3.5.1 &amp;middot; curl 7.76.1. 이 글의 모든 명령 출력은 이 환경에서 실제로 인증서를 만들고 접속을 시도해 얻은 것입니다.&lt;/blockquote&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;신호 관찰 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-enddate&lt;/code&gt;가 아니라 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-checkend&lt;/code&gt;로 봅니다&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;왜 위험한가 &amp;mdash; 리프만 보고 안심하면 안 되는 이유&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;재현 &amp;mdash; 만료된 인증서로 실제로 끊어 봅니다&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;임계값과 오탐 &amp;mdash; 언제부터, 그리고 아닌 경우&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;지금 조치 &amp;mdash; 갱신 자체보다 갱신 자동화를 먼저 봅니다&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;치트시트 &amp;mdash; 정기 점검 명령&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. 신호 관찰 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-enddate&lt;/code&gt;가 아니라 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-checkend&lt;/code&gt;로 봅니다&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ openssl x509 -in cert.pem -noout -enddate&lt;br /&gt;notAfter=Aug 26 10:54:22 2026 GMT&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-enddate&lt;/code&gt;는 날짜를 보여줄 뿐, &quot;며칠 남았다&quot;는 계산은 직접 해야 합니다. 스크립트로 점검한다면 &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-checkend&lt;/code&gt;&lt;/b&gt;가 더 낫습니다 &amp;mdash; 주어진 초(seconds) 안에 만료되는지를 종료 코드로 바로 알려줍니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ openssl x509 -in cert.pem -checkend 2592000 # 30일(2,592,000초) 이내 만료 예정?&lt;br /&gt;Certificate will expire&lt;br /&gt;$ echo &quot;rc=$?&quot;&lt;br /&gt;rc=1&lt;br /&gt;$ openssl x509 -in cert.pem -checkend 0 # 지금 이 순간 기준&lt;br /&gt;Certificate will not expire&lt;br /&gt;$ echo &quot;rc=$?&quot;&lt;br /&gt;rc=0&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 인증서는 지금 당장은 유효(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;checkend 0&lt;/code&gt; &amp;rarr; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rc=0&lt;/code&gt;)하지만 &lt;b&gt;30일 안에는 만료&lt;/b&gt;(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;checkend 2592000&lt;/code&gt; &amp;rarr; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rc=1&lt;/code&gt;)됩니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rc&lt;/code&gt;만 보면 되니 모니터링 스크립트에 그대로 넣기 좋습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;파일이 로컬에 없는 경우(리버스 프록시&amp;middot;로드밸런서 뒤라 실제 서빙되는 인증서를 모를 때)는 접속 중인 엔드포인트에서 직접 뽑습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ echo | openssl s_client -connect &amp;lt;호스트&amp;gt;:&amp;lt;포트&amp;gt; -servername &amp;lt;SNI호스트명&amp;gt; 2&amp;gt;/dev/null \&lt;br /&gt;| openssl x509 -noout -enddate&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #6b7280; background: #f9fafb !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;이 방식이 파일을 직접 보는 것보다 낫습니다.&lt;/b&gt; 서버가 실제로 내보내는 인증서를 그대로 확인하기 때문에, 갱신된 인증서 파일이 디스크에는 있는데 &lt;b&gt;웹서버가 아직 리로드되지 않아 옛 인증서를 계속 서빙 중인 상태&lt;/b&gt;도 이 방식으로만 잡힙니다.&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 왜 위험한가 &amp;mdash; 리프만 보고 안심하면 안 되는 이유&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;TLS 클라이언트는 인증서 하나만 보지 않습니다 &amp;mdash; 리프(내 도메인 인증서)부터 루트까지 &lt;b&gt;체인 전체&lt;/b&gt;를 검증하고, 체인 안의 인증서 중 &lt;b&gt;어느 하나라도 만료되면 전체가 거부&lt;/b&gt;됩니다. 리프 인증서의 유효기간이 1년 남았어도, 그 리프에 서명한 중간 인증서가 먼저 만료되면 똑같이 끊깁니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;실제로 만들어서 확인했습니다. 루트 CA(2027년까지 유효) &amp;rarr; 중간 CA(&lt;b&gt;이미 만료&lt;/b&gt;) &amp;rarr; 리프(2027년까지 유효) 3단 체인을 만들고, 리프 인증서 자체만 확인하면 이렇게 보입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ openssl x509 -in leaf.pem -noout -enddate&lt;br /&gt;notAfter=Jun&amp;nbsp;&amp;nbsp;1 00:00:00 2027 GMT&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;멀쩡해 보입니다.&lt;/b&gt; 그런데 중간 인증서는 이미 만료됐습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ openssl x509 -in inter.pem -noout -enddate&lt;br /&gt;notAfter=Aug 24 00:00:00 2026 GMT&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;체인 전체를 검증하면 바로 드러납니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ openssl verify -CAfile root.pem -untrusted inter.pem leaf.pem&lt;br /&gt;CN=test-intermediate&lt;br /&gt;error 10 at 1 depth lookup: certificate has expired&lt;br /&gt;error leaf.pem: verification failed&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;error 10 at 1 depth lookup&lt;/code&gt; &amp;mdash; 체인에서 &lt;b&gt;1단계 위(중간 인증서)&lt;/b&gt;에서 만료 오류가 났다는 뜻입니다. &lt;b&gt;리프의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-enddate&lt;/code&gt;만 정기 점검에 넣어 뒀다면 이 상태를 영영 못 봅니다.&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #dc2626; background: #fef2f2 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;2021년 Let's Encrypt의 옛 루트 인증서(DST Root CA X3)가 실제로 만료되면서, 리프는 전부 멀쩡한데 구형 클라이언트들이 체인 검증에서 무더기로 실패한 사례가 있었습니다. 이 글의 3단 재현은 그 상황을 압축한 것입니다 &amp;mdash; &lt;b&gt;리프가 아니라 체인 어딘가가 원인일 수 있다는 걸 늘 염두에 둡니다.&lt;/b&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 재현 &amp;mdash; 만료된 인증서로 실제로 끊어 봅니다&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;openssl req&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-not_after&lt;/code&gt;로 만료일을 과거로 직접 지정하면, 기다리지 않고도 진짜 만료된 인증서를 만들 수 있습니다. 로컬 루프백에서만 도는 테스트 서버라 운영 서비스와는 무관합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ openssl req -x509 -newkey rsa:2048 -keyout key.pem -out expired.pem -nodes \&lt;br /&gt;-subj &quot;/CN=test.local&quot; -not_before 20260101000000Z -not_after 20260823000000Z&lt;br /&gt;$ openssl x509 -in expired.pem -noout -enddate&lt;br /&gt;notAfter=Aug 23 00:00:00 2026 GMT&lt;br /&gt;$ openssl s_server -cert expired.pem -key key.pem -accept 18444 -naccept 1 -quiet &amp;amp;&lt;br /&gt;$ echo | openssl s_client -connect 127.0.0.1:18444 -CAfile expired.pem -verify_return_error&lt;br /&gt;verify error:num=10:certificate has expired&lt;br /&gt;...&lt;br /&gt;Verification error: certificate has expired&lt;br /&gt;Verify return code: 10 (certificate has expired)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;curl&lt;/code&gt;로 접속하면 실무에서 훨씬 자주 보는 형태의 메시지가 뜹니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ curl --cacert expired.pem https://127.0.0.1:18444/ -sv 2&amp;gt;&amp;amp;1 | grep -i expire&lt;br /&gt;* TLSv1.3 (OUT), TLS alert, certificate expired (557):&lt;br /&gt;* SSL certificate problem: certificate has expired&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;두 도구 다 만료 &lt;b&gt;정확히 그 순간부터&lt;/b&gt; 실패합니다. 그 전까지는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-enddate&lt;/code&gt;나 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-checkend&lt;/code&gt;로 미리 찾아보지 않는 한, 접속은 끝까지 정상입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 임계값과 오탐 &amp;mdash; 언제부터, 그리고 아닌 경우&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;며칠 전부터 경고할지는 인증서 발급 주기에 따라 다릅니다. Let's Encrypt처럼 90일짜리라면 &lt;b&gt;30일 전&lt;/b&gt;(전체 유효기간의 3분의 1)에 갱신을 시작하는 게 흔한 관례입니다 &amp;mdash; 갱신이 한 번 실패해도 재시도할 여유를 남기기 위해서입니다. 1~2년짜리 상용 인증서라면 만료 30~60일 전에 발급사에서 갱신 안내 메일이 오는 관행 자체가 이 여유를 반영합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;오탐 주의 &amp;mdash; 이 신호인데 장애로 안 이어지는 경우&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;상황&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;왜 괜찮은가&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;만료 임박이지만 자동 갱신(certbot 타이머 등)이 스케줄돼 있고 최근에 정상 동작한 이력이 있음&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;5장에서 볼 것처럼, 진짜 봐야 할 건 인증서 날짜가 아니라 갱신 자동화가 살아 있는지다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;더는 안 쓰는 도메인&amp;middot;서비스의 인증서가 만료 임박&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;실제 트래픽이 없다면 만료돼도 장애가 아니다 &amp;mdash; 다만 &quot;안 쓰는지&quot; 확인 없이 방치하면 다음 담당자가 오탐으로 놀란다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;내부망 전용, mTLS로 상호 검증하는 사설 CA 인증서가 만료 임박&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사설 CA 정책에 따라 유효기간이 의도적으로 짧을 수 있음(예: 90일 회전) &amp;mdash; 그 자체가 설계라면 정상&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;SAN에 여러 도메인이 걸린 인증서에서 그중 하나만 확인해 &quot;괜찮다&quot;고 판단&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;같은 인증서를 쓰는 다른 도메인들도 정확히 같은 날 같이 만료된다 &amp;mdash; 하나만 보고 판단하면 나머지에서 놓친다&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 지금 조치 &amp;mdash; 갱신 자체보다 갱신 자동화를 먼저 봅니다&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #16a34a; background: #f0fdf4 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;당장 할 수 있는 것&lt;/b&gt; &amp;mdash; 만료가 임박했다면 즉시 갱신하고, &lt;b&gt;리프뿐 아니라 체인 전체를 재배포&lt;/b&gt;합니다(2장의 함정). 갱신 후에는 반드시 라이브 엔드포인트에서 다시 확인합니다(1장의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;s_client&lt;/code&gt; 방식) &amp;mdash; 파일만 바꾸고 서버 리로드를 빠뜨리면 옛 인증서가 계속 나갑니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;지금 못 고치면 남겨 둘 것&lt;/b&gt; &amp;mdash; 이번 건을 수동으로 해결했다면, &lt;b&gt;왜 자동 갱신이 이 인증서를 놓쳤는지&lt;/b&gt;를 남겨 둡니다. 진짜 장애 하루 전 신호는 인증서 날짜 자체가 아니라, &lt;b&gt;자동 갱신 작업(cron&amp;middot;systemd timer&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;certbot renew&lt;/code&gt;)이 며칠 전부터 조용히 실패하고 있었다는 것&lt;/b&gt;인 경우가 많습니다. 인증서 만료를 감시하는 것보다, 갱신 자동화가 마지막으로 성공한 시각을 감시하는 게 더 이른 신호입니다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;systemctl list-timers | grep -i certbot # 갱신 타이머가 살아 있는지&lt;br /&gt;certbot renew --dry-run # 실제 발급 없이 갱신 경로만 검증&lt;br /&gt;journalctl -u certbot.timer --since -30d # 최근 갱신 시도 이력&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 치트시트 &amp;mdash; 정기 점검 명령&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;openssl x509 -in &amp;lt;파일&amp;gt; -noout -checkend 2592000 # 30일 이내 만료? rc로 판단&lt;br /&gt;echo | openssl s_client -connect &amp;lt;호스트&amp;gt;:&amp;lt;포트&amp;gt; -servername &amp;lt;SNI&amp;gt; 2&amp;gt;/dev/null \&lt;br /&gt;| openssl x509 -noout -enddate # 실제 서빙 중인 인증서 확인&lt;br /&gt;openssl verify -CAfile &amp;lt;루트&amp;gt; -untrusted &amp;lt;중간체인&amp;gt; &amp;lt;리프&amp;gt; # 체인 전체 검증&lt;br /&gt;systemctl list-timers | grep -i certbot # 갱신 자동화가 살아 있는지&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;이 글이 보탠 것&lt;/b&gt; &amp;mdash; 리프 인증서만 확인하면 놓치는 &quot;중간 인증서 만료&quot;를 3단 체인을 직접 만들어 재현했고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;curl&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;openssl s_client&lt;/code&gt; 양쪽에서 만료 순간의 정확한 실패 메시지를 확보했습니다. 그리고 이 시리즈의 다른 신호들과 달리, 인증서는 &lt;b&gt;날짜가 이미 정해져 있다는 것 자체가 무기&lt;/b&gt;입니다 &amp;mdash; 며칠 남았는지 세는 게 아니라, 그 갱신을 맡은 자동화가 지금도 살아 있는지를 봐야 합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;1~4편이 전부 &quot;값이 한도에 다가가는지&quot;를 봤다면, 이번 건 &quot;예정된 사건을 처리할 자동화가 조용히 죽어 있지 않은지&quot;를 보는 글이었습니다.&lt;/p&gt;
&lt;/div&gt;</description>
      <category>리눅스/장애  D-1일전</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/54</guid>
      <comments>https://wowpanel.tistory.com/entry/certificate-has-expired-%E2%80%94-%EC%9D%B8%EC%A6%9D%EC%84%9C-%EB%A7%8C%EB%A3%8C-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8#entry54comment</comments>
      <pubDate>Wed, 9 Sep 2026 08:00:05 +0900</pubDate>
    </item>
    <item>
      <title>Start request repeated too quickly &amp;mdash; 서비스 flapping, 장애 하루 전 신호</title>
      <link>https://wowpanel.tistory.com/entry/Start-request-repeated-too-quickly-%E2%80%94-%EC%84%9C%EB%B9%84%EC%8A%A4-flapping-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8</link>
      <description>&lt;div style=&quot;display:block;float:none;position:static;max-width:1000px;margin:0 auto;padding:8px 4px;text-align:left;background:#ffffff !important;color:#333333 !important;font-size:17px;line-height:1.9;word-break:keep-all;&quot;&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;Restart=always&lt;/code&gt;를 걸어 둔 서비스는 죽어도 알아서 다시 뜬다고 믿기 쉽습니다. 맞는 말이지만 조건이 하나 있습니다 — &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;짧은 시간에 너무 자주 죽으면 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;systemd&lt;/code&gt;가 재시작 자체를 포기합니다.&lt;/strong&gt; 그 뒤로는 다음에 진짜 장애가 나도 자동 복구가 동작하지 않습니다. 이 글은 이 한도에 다가가는 신호를 어떻게 보는지, 실제로 그 한도까지 몰아붙여 재현하고, 오늘 뭘 확인해야 하는지를 다룹니다.&lt;/p&gt;
&lt;div style=&quot;display:block;float:none;position:static;border-left:4px solid #2563eb;background:#f8fafc !important;color:#333333 !important;padding:16px 20px 4px;margin:0 0 24px;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;&lt;p style=&quot;margin:0 0 12px;font-size:16px;line-height:1.8;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;수요일 새벽, 배치 워커 서비스&lt;/strong&gt; — 새로 배포한 워커가 설정 파일 하나를 잘못 읽어 기동 직후 매번 죽었다. &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;Restart=always&lt;/code&gt;가 걸려 있어 당연히 다시 뜰 거라 생각했는데, 아침에 보니 서비스는 죽은 채였고 그날 새벽 배치가 통째로 안 돌았다. 로그를 훑어보니 새벽 3시 12분 이후로는 재시작 시도 자체가 없었다 — &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;systemd&lt;/code&gt;가 그 시각에 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&quot;너무 자주 재시작한다&quot;&lt;/strong&gt;며 스스로 멈춘 것이었다.&lt;/p&gt;&lt;/div&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;systemd&lt;/code&gt;는 서비스가 일정 시간 안에 일정 횟수 이상 재시작되면 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;더 이상 재시작을 시도하지 않습니다.&lt;/strong&gt; 이건 무한 재시작 루프로 시스템 자원을 잡아먹는 걸 막기 위한 설계지만, 이 한도에 이미 근접해 있었다는 신호를 놓치면 다음 장애 때 자동 복구가 조용히 사라져 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display:block;float:none;position:static;margin:0 0 24px;padding:14px 20px;background:#fbfbfc !important;color:#333333 !important;font-size:16px;line-height:1.8;border-left:4px solid #6b7280;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;측정 환경: Rocky Linux 9.7(커널 5.14.0-611.47.1.el9_7) · systemd 252(252-55.el9_7.8.rocky.0.1). 이 글의 모든 명령 출력은 이 환경에서 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;systemd-run&lt;/code&gt; &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;--user&lt;/code&gt;(사용자 세션, &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;sudo&lt;/code&gt; 불필요)로 직접 재현해 얻은 것입니다.&lt;/blockquote&gt;
&lt;hr style=&quot;border:0;border-top:1px solid #e5e7eb;margin:44px 0;height:0;background:transparent !important;&quot;&gt;
&lt;h2 style=&quot;font-size:26px;line-height:1.4;font-weight:700;color:#1a1a1a;margin:56px 0 20px;padding-bottom:12px;border-bottom:2px solid #e5e7eb;letter-spacing:-0.3px;word-break:keep-all;text-align:left;background:transparent !important;&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin:0 0 20px;padding-left:24px;list-style:decimal outside;background:transparent !important;color:#333333;text-align:left;&quot;&gt;&lt;li style=&quot;margin:0 0 8px;font-size:17px;line-height:1.9;color:#333333;display:list-item;text-align:left;background:transparent !important;list-style:inherit;&quot;&gt;&lt;a href=&quot;#s1&quot; style=&quot;color:#2563eb !important;text-decoration:underline;display:inline;font-size:inherit;line-height:inherit;background:transparent !important;&quot;&gt;신호 관찰 — 재시작 카운터와 한도 대비 비율&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 8px;font-size:17px;line-height:1.9;color:#333333;display:list-item;text-align:left;background:transparent !important;list-style:inherit;&quot;&gt;&lt;a href=&quot;#s2&quot; style=&quot;color:#2563eb !important;text-decoration:underline;display:inline;font-size:inherit;line-height:inherit;background:transparent !important;&quot;&gt;왜 위험한가 — 자동 재시작도, 수동 재시작도 같은 카운터를 씁니다&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 8px;font-size:17px;line-height:1.9;color:#333333;display:list-item;text-align:left;background:transparent !important;list-style:inherit;&quot;&gt;&lt;a href=&quot;#s3&quot; style=&quot;color:#2563eb !important;text-decoration:underline;display:inline;font-size:inherit;line-height:inherit;background:transparent !important;&quot;&gt;재현 — 기본값 그대로 한도까지 밀어붙여 봅니다&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 8px;font-size:17px;line-height:1.9;color:#333333;display:list-item;text-align:left;background:transparent !important;list-style:inherit;&quot;&gt;&lt;a href=&quot;#s4&quot; style=&quot;color:#2563eb !important;text-decoration:underline;display:inline;font-size:inherit;line-height:inherit;background:transparent !important;&quot;&gt;임계값과 오탐 — 몇 번부터, 그리고 아닌 경우&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 8px;font-size:17px;line-height:1.9;color:#333333;display:list-item;text-align:left;background:transparent !important;list-style:inherit;&quot;&gt;&lt;a href=&quot;#s5&quot; style=&quot;color:#2563eb !important;text-decoration:underline;display:inline;font-size:inherit;line-height:inherit;background:transparent !important;&quot;&gt;지금 조치 — 카운터를 지울지, 원인을 고칠지&lt;/a&gt;&lt;/li&gt;&lt;li style=&quot;margin:0 0 8px;font-size:17px;line-height:1.9;color:#333333;display:list-item;text-align:left;background:transparent !important;list-style:inherit;&quot;&gt;&lt;a href=&quot;#s6&quot; style=&quot;color:#2563eb !important;text-decoration:underline;display:inline;font-size:inherit;line-height:inherit;background:transparent !important;&quot;&gt;치트시트 — 정기 점검 명령&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;hr style=&quot;border:0;border-top:1px solid #e5e7eb;margin:44px 0;height:0;background:transparent !important;&quot;&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size:26px;line-height:1.4;font-weight:700;color:#1a1a1a;margin:56px 0 20px;padding-bottom:12px;border-bottom:2px solid #e5e7eb;letter-spacing:-0.3px;word-break:keep-all;text-align:left;background:transparent !important;&quot;&gt;1. 신호 관찰 — 재시작 카운터와 한도 대비 비율&lt;/h2&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;systemctl show&lt;/code&gt;의 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;NRestarts&lt;/code&gt;가 그 서비스의 지금까지 재시작 횟수, &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;StartLimitBurst&lt;/code&gt;가 한도입니다. 이 둘이 같아지기 직전(예: 4/5)이면 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;한 번만 더 실패해도 자동 복구가 완전히 멈춥니다.&lt;/strong&gt; 1초마다 죽는 서비스 하나를 실제로 띄워 이 숫자가 올라가는 걸 그대로 지켜봤습니다.&lt;/p&gt;
&lt;div style=&quot;display:block;float:none;position:static;background:#1e1e1e !important;color:#e6e6e6 !important;border-radius:8px;padding:18px 20px;margin:0 0 24px;overflow-x:auto;font-size:13.5px;line-height:1.7;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace !important;white-space:pre !important;tab-size:8;-webkit-text-size-adjust:100%;text-align:left;word-spacing:normal;text-indent:0;&quot;&gt;$ systemd-run --user --unit=flapslow -p Restart=always bash -c 'sleep 1; exit 1'&lt;br&gt;$ for i in $(seq 1 8); do&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sleep 1&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;N=$(systemctl --user show flapslow.service -p NRestarts --value)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ST=$(systemctl --user show flapslow.service -p ActiveState --value)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;t=${i}s NRestarts=$N ActiveState=$ST&quot;&lt;br&gt;&amp;nbsp;&amp;nbsp;done&lt;br&gt;t=1s NRestarts=0 ActiveState=activating&lt;br&gt;t=2s NRestarts=1 ActiveState=active&lt;br&gt;t=3s NRestarts=2 ActiveState=active&lt;br&gt;t=4s NRestarts=3 ActiveState=active&lt;br&gt;t=5s NRestarts=4 ActiveState=active&lt;br&gt;t=6s NRestarts=5 ActiveState=failed&lt;br&gt;t=7s NRestarts=5 ActiveState=failed&lt;br&gt;t=8s NRestarts=5 ActiveState=failed&lt;/div&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;t=5s&lt;/code&gt;에서 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;NRestarts=4&lt;/code&gt;(한도 5 중 4) — 아직 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;ActiveState=active&lt;/code&gt;라 겉으로는 멀쩡해 보입니다. 바로 다음 초(&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;t=6s&lt;/code&gt;)에 5번째 재시작이 한도에 닿으면서 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;ActiveState=failed&lt;/code&gt;로 바뀌고, 그 뒤로는 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;NRestarts&lt;/code&gt;가 더 이상 안 오릅니다. &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;active&lt;/code&gt;인 동안에도 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;NRestarts&lt;/code&gt;가 한도에 근접해 있으면, 다음 실패 한 번이 곧바로 복구 중단으로 이어진다는 뜻입니다.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote style=&quot;display:block;float:none;position:static;margin:0 0 24px;padding:14px 20px;background:#fbfbfc !important;color:#333333 !important;font-size:16px;line-height:1.8;border-left:4px solid #6b7280;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;systemctl status&lt;/code&gt; 맨 아래 줄들이 최근 로그 몇 줄을 같이 보여줍니다. 이 서버는 사용자(&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;--user&lt;/code&gt;) 세션의 저널이 별도로 안 쌓이는 구성이라 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;journalctl --user -u &amp;lt;서비스&amp;gt;&lt;/code&gt;로는 안 잡히고, &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;systemctl status&lt;/code&gt;에 딸려 나오는 로그 스니펫이 사실상 유일한 창&lt;/strong&gt;이었습니다. 이 구성 차이가 있는지 먼저 확인하십시오.&lt;/blockquote&gt;
&lt;hr style=&quot;border:0;border-top:1px solid #e5e7eb;margin:44px 0;height:0;background:transparent !important;&quot;&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size:26px;line-height:1.4;font-weight:700;color:#1a1a1a;margin:56px 0 20px;padding-bottom:12px;border-bottom:2px solid #e5e7eb;letter-spacing:-0.3px;word-break:keep-all;text-align:left;background:transparent !important;&quot;&gt;2. 왜 위험한가 — 자동 재시작도, 수동 재시작도 같은 카운터를 씁니다&lt;/h2&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;man systemd.unit&lt;/code&gt;의 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;StartLimitIntervalSec=&lt;/code&gt;, &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;StartLimitBurst=&lt;/code&gt; 항목입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display:block;float:none;position:static;margin:0 0 24px;padding:14px 20px;background:#fbfbfc !important;color:#333333 !important;font-size:16px;line-height:1.8;border-left:4px solid #6b7280;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;Units which are started more than &lt;em style=&quot;display:inline;font-style:italic;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;burst&lt;/em&gt; times within an &lt;em style=&quot;display:inline;font-style:italic;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;interval&lt;/em&gt; time span are not permitted to start any more. Use StartLimitIntervalSec= to configure the checking interval and StartLimitBurst= to configure how many starts per interval are allowed. ... &lt;em style=&quot;display:inline;font-style:italic;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;interval&lt;/em&gt; ... Defaults to DefaultStartLimitIntervalSec= in manager configuration file ... &lt;em style=&quot;display:inline;font-style:italic;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;burst&lt;/em&gt; ... defaults to DefaultStartLimitBurst= in manager configuration file.&lt;/blockquote&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;기본값은 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;man systemd-system.conf&lt;/code&gt;에 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display:block;float:none;position:static;margin:0 0 24px;padding:14px 20px;background:#fbfbfc !important;color:#333333 !important;font-size:16px;line-height:1.8;border-left:4px solid #6b7280;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;DefaultStartLimitIntervalSec= defaults to 10s.&lt;br&gt;DefaultStartLimitBurst= defaults to 5.&lt;/blockquote&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;10초 안에 5번&lt;/strong&gt;이 기본값입니다 — 기동 즉시 죽는 서비스라면 순식간에 소진되는 아주 빡빡한 한도입니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;여기서 흔한 오해가 있습니다&lt;/strong&gt; — 이 카운터가 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;Restart=&lt;/code&gt;로 인한 자동 재시작만 센다고 생각하기 쉬운데, 같은 항목이 이렇게 덧붙입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display:block;float:none;position:static;margin:0 0 24px;padding:14px 20px;background:#fbfbfc !important;color:#333333 !important;font-size:16px;line-height:1.8;border-left:4px solid #6b7280;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;These configuration options are particularly useful in conjunction with the service setting Restart= ...; however, &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;they apply to all kinds of starts (including manual), not just those triggered by the Restart= logic.&lt;/strong&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;즉 담당자가 장애 대응 중에 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;systemctl restart&lt;/code&gt;를 손으로 반복 실행하는 것도 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;똑같이 카운터에 들어갑니다.&lt;/strong&gt; 디버깅한다고 급한 마음에 몇 번 연달아 수동으로 재시작을 시도하면, 정작 원인을 못 찾고 물러난 사이 자동 복구까지 같이 멈춰 있을 수 있습니다.&lt;/p&gt;
&lt;div style=&quot;display:block;float:none;position:static;border-left:4px solid #6b7280;background:#f9fafb !important;color:#333333 !important;padding:16px 20px 4px;margin:0 0 24px;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;&lt;p style=&quot;margin:0 0 12px;font-size:16px;line-height:1.8;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;man systemd.unit&lt;/code&gt;은 회복 경로도 명시합니다 — &lt;em style=&quot;display:inline;font-style:italic;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&quot;units which are configured for Restart=, and which reach the start limit are not attempted to be restarted anymore; however, they may still be restarted manually or from a timer or socket at a later point, after the interval has passed. ... systemctl reset-failed will cause the restart rate counter for a service to be flushed.&quot;&lt;/em&gt; 즉 ① 창 시간이 지나거나 ② &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;reset-failed&lt;/code&gt;로 수동 초기화하면 다시 재시작을 받아 줍니다. 5장에서 이걸 실제로 확인합니다.&lt;/p&gt;&lt;/div&gt;
&lt;hr style=&quot;border:0;border-top:1px solid #e5e7eb;margin:44px 0;height:0;background:transparent !important;&quot;&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size:26px;line-height:1.4;font-weight:700;color:#1a1a1a;margin:56px 0 20px;padding-bottom:12px;border-bottom:2px solid #e5e7eb;letter-spacing:-0.3px;word-break:keep-all;text-align:left;background:transparent !important;&quot;&gt;3. 재현 — 기본값 그대로 한도까지 밀어붙여 봅니다&lt;/h2&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;systemd-run&lt;/code&gt; &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;--user&lt;/code&gt;로 즉시 실패하는 트랜지언트 서비스를 띄우면 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;sudo&lt;/code&gt; 없이, 실제 배포된 서비스를 안 건드리고 같은 상황을 재현할 수 있습니다. 이 글의 모든 값은 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;StartLimitIntervalSec&lt;/code&gt;·&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;StartLimitBurst&lt;/code&gt;를 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;건드리지 않은 기본값(10초/5회)&lt;/strong&gt; 그대로입니다.&lt;/p&gt;
&lt;div style=&quot;display:block;float:none;position:static;background:#1e1e1e !important;color:#e6e6e6 !important;border-radius:8px;padding:18px 20px;margin:0 0 24px;overflow-x:auto;font-size:13.5px;line-height:1.7;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace !important;white-space:pre !important;tab-size:8;-webkit-text-size-adjust:100%;text-align:left;word-spacing:normal;text-indent:0;&quot;&gt;$ systemd-run --user --unit=flaptest2 -p Restart=always /bin/false&lt;br&gt;Running as unit: flaptest2.service&lt;br&gt;$ sleep 2&lt;br&gt;$ systemctl --user status flaptest2.service --no-pager -l&lt;br&gt;× flaptest2.service - /bin/false&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Loaded: loaded (/run/user/1000/systemd/transient/flaptest2.service; transient)&lt;br&gt;&amp;nbsp;&amp;nbsp;Transient: yes&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Active: failed (Result: exit-code) since Tue 2026-08-25 18:46:07 KST; 833ms ago&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Duration: 4ms&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Process: 3661066 ExecStart=/bin/false (code=exited, status=1/FAILURE)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Main PID: 3661066 (code=exited, status=1/FAILURE)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CPU: 4ms&lt;br&gt;&lt;br&gt;&amp;nbsp;8월 25 18:46:07 wowpanel.tistory.com systemd[3603804]: flaptest2.service: Scheduled restart job, restart counter is at 5.&lt;br&gt;&amp;nbsp;8월 25 18:46:07 wowpanel.tistory.com systemd[3603804]: Stopped /bin/false.&lt;br&gt;&amp;nbsp;8월 25 18:46:07 wowpanel.tistory.com systemd[3603804]: flaptest2.service: Start request repeated too quickly.&lt;br&gt;&amp;nbsp;8월 25 18:46:07 wowpanel.tistory.com systemd[3603804]: flaptest2.service: Failed with result 'exit-code'.&lt;br&gt;&amp;nbsp;8월 25 18:46:07 wowpanel.tistory.com systemd[3603804]: Failed to start /bin/false.&lt;br&gt;$ systemctl --user show flaptest2.service -p StartLimitIntervalUSec -p StartLimitBurst -p NRestarts&lt;br&gt;StartLimitIntervalUSec=10s&lt;br&gt;StartLimitBurst=5&lt;br&gt;NRestarts=5&lt;/div&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;/bin/false&lt;/code&gt;는 기동하자마자 죽으므로 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;Duration: 4ms&lt;/code&gt;, 전체 재현이 833ms 안에 끝났습니다.&lt;/strong&gt; 로그의 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;restart counter is at 5&lt;/code&gt;가 한도(&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;StartLimitBurst=5&lt;/code&gt;)에 정확히 닿은 순간이고, 바로 다음 줄 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;Start request repeated too quickly.&lt;/code&gt;가 그 이후로는 재시작을 안 하겠다는 선언입니다. &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;NRestarts=5&lt;/code&gt;로 멈춘 채 더 안 올라가는 게 그 증거입니다.&lt;/p&gt;
&lt;div style=&quot;display:block;float:none;position:static;border-left:4px solid #dc2626;background:#fef2f2 !important;color:#333333 !important;padding:16px 20px 4px;margin:0 0 24px;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;&lt;p style=&quot;margin:0 0 12px;font-size:16px;line-height:1.8;color:#333333;text-align:left;background:transparent !important;&quot;&gt;실제 서비스는 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;/bin/false&lt;/code&gt;처럼 순식간에 안 죽습니다 — 기동 준비(설정 로드, 커넥션 시도)에 몇 초가 걸리는 서비스라면 이 5번 소진까지 수십 초에서 몇 분이 걸릴 수 있습니다. &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&quot;아직 몇 번 안 죽었으니 여유 있다&quot;고 안심하지 말고, &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;StartLimitIntervalUSec&lt;/code&gt; 창(기본 10초) 안에서 몇 번 죽었는지를 봐야 합니다.&lt;/strong&gt; 10초 창을 벗어나 죽은 재시작은 이전 실패와 별개로 새로 카운트가 시작됩니다.&lt;/p&gt;&lt;/div&gt;
&lt;hr style=&quot;border:0;border-top:1px solid #e5e7eb;margin:44px 0;height:0;background:transparent !important;&quot;&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size:26px;line-height:1.4;font-weight:700;color:#1a1a1a;margin:56px 0 20px;padding-bottom:12px;border-bottom:2px solid #e5e7eb;letter-spacing:-0.3px;word-break:keep-all;text-align:left;background:transparent !important;&quot;&gt;4. 임계값과 오탐 — 몇 번부터, 그리고 아닌 경우&lt;/h2&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;NRestarts&lt;/code&gt; 절대값이 아니라 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;StartLimitBurst&lt;/code&gt; 대비 비율&lt;/strong&gt;, 그리고 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;그 재시작들이 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;StartLimitIntervalUSec&lt;/code&gt; 창 안에 몰려 있는지&lt;/strong&gt;를 봅니다. 기본값(10초/5회) 기준이면 사실상 &quot;여유&quot;라고 부를 구간이 거의 없습니다 — 3~4회째부터는 바로 다음 장에서 다룰 조치를 준비해야 합니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;오탐 주의 — 이 신호인데 장애로 안 이어지는 경우&lt;/strong&gt;&lt;/p&gt;
&lt;div style=&quot;display:block;float:none;position:static;overflow-x:auto;margin:0 0 24px;text-align:left;background:transparent !important;&quot;&gt;&lt;table style=&quot;border-collapse:collapse;width:100%;font-size:15px;color:#333333;min-width:620px;display:table;background:transparent !important;&quot;&gt;&lt;thead style=&quot;display:table-header-group;&quot;&gt;&lt;tr style=&quot;display:table-row;&quot;&gt;&lt;th style=&quot;border:1px solid #e5e7eb;background:#f4f4f5 !important;padding:10px 13px;text-align:left;font-weight:700;color:#1a1a1a !important;font-size:15px;line-height:1.7;display:table-cell;&quot;&gt;상황&lt;/th&gt;&lt;th style=&quot;border:1px solid #e5e7eb;background:#f4f4f5 !important;padding:10px 13px;text-align:left;font-weight:700;color:#1a1a1a !important;font-size:15px;line-height:1.7;display:table-cell;&quot;&gt;왜 괜찮은가&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody style=&quot;display:table-row-group;&quot;&gt;&lt;tr style=&quot;display:table-row;&quot;&gt;&lt;td style=&quot;border:1px solid #e5e7eb;padding:10px 13px;vertical-align:top;background:#ffffff !important;color:#333333 !important;font-size:15px;line-height:1.7;text-align:left;display:table-cell;&quot;&gt;배포 직후 재시작 1~2회 후 안정화&lt;/td&gt;&lt;td style=&quot;border:1px solid #e5e7eb;padding:10px 13px;vertical-align:top;background:#ffffff !important;color:#333333 !important;font-size:15px;line-height:1.7;text-align:left;display:table-cell;&quot;&gt;새 버전이 뜨는 과정의 흔한 정상 패턴 — &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;NRestarts&lt;/code&gt;가 그 뒤로 안 늘면 급한 신호가 아니다&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;display:table-row;&quot;&gt;&lt;td style=&quot;border:1px solid #e5e7eb;padding:10px 13px;vertical-align:top;background:#ffffff !important;color:#333333 !important;font-size:15px;line-height:1.7;text-align:left;display:table-cell;&quot;&gt;재시작 창을 넉넉히(예: 300s) 늘려 둔 서비스&lt;/td&gt;&lt;td style=&quot;border:1px solid #e5e7eb;padding:10px 13px;vertical-align:top;background:#ffffff !important;color:#333333 !important;font-size:15px;line-height:1.7;text-align:left;display:table-cell;&quot;&gt;창이 넓으면 같은 5회라도 훨씬 오래 버틴다 — &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;StartLimitIntervalUSec&lt;/code&gt; 값을 같이 확인한다&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;display:table-row;&quot;&gt;&lt;td style=&quot;border:1px solid #e5e7eb;padding:10px 13px;vertical-align:top;background:#ffffff !important;color:#333333 !important;font-size:15px;line-height:1.7;text-align:left;display:table-cell;&quot;&gt;담당자가 방금 수동으로 몇 차례 재시작함&lt;/td&gt;&lt;td style=&quot;border:1px solid #e5e7eb;padding:10px 13px;vertical-align:top;background:#ffffff !important;color:#333333 !important;font-size:15px;line-height:1.7;text-align:left;display:table-cell;&quot;&gt;수동 재시작도 카운터에 들어간다(2장) — 서비스 실패가 아니라 사람 조작이 원인일 수 있다&lt;/td&gt;&lt;/tr&gt;&lt;tr style=&quot;display:table-row;&quot;&gt;&lt;td style=&quot;border:1px solid #e5e7eb;padding:10px 13px;vertical-align:top;background:#ffffff !important;color:#333333 !important;font-size:15px;line-height:1.7;text-align:left;display:table-cell;&quot;&gt;서비스가 정상 종료(exit 0)로 자주 재시작됨&lt;/td&gt;&lt;td style=&quot;border:1px solid #e5e7eb;padding:10px 13px;vertical-align:top;background:#ffffff !important;color:#333333 !important;font-size:15px;line-height:1.7;text-align:left;display:table-cell;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;Restart=on-failure&lt;/code&gt;는 실패 종료에만 재시작한다 — 원인이 반복 실패가 아니면 이 글과 무관&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;
&lt;hr style=&quot;border:0;border-top:1px solid #e5e7eb;margin:44px 0;height:0;background:transparent !important;&quot;&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size:26px;line-height:1.4;font-weight:700;color:#1a1a1a;margin:56px 0 20px;padding-bottom:12px;border-bottom:2px solid #e5e7eb;letter-spacing:-0.3px;word-break:keep-all;text-align:left;background:transparent !important;&quot;&gt;5. 지금 조치 — 카운터를 지울지, 원인을 고칠지&lt;/h2&gt;
&lt;div style=&quot;display:block;float:none;position:static;border-left:4px solid #dc2626;background:#fef2f2 !important;color:#333333 !important;padding:16px 20px 4px;margin:0 0 24px;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;&lt;p style=&quot;margin:0 0 12px;font-size:16px;line-height:1.8;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;systemctl reset-failed&lt;/code&gt;를 원인도 안 고치고 먼저 누르지 마십시오.&lt;/strong&gt; 카운터만 지우면 서비스는 다시 죽고-재시작을 반복하다가 10초 안에 또 5번을 채우고 그대로 멈춥니다. 원인을 못 고쳤다면 지운 의미가 없습니다.&lt;/p&gt;&lt;/div&gt;
&lt;div style=&quot;display:block;float:none;position:static;border-left:4px solid #16a34a;background:#f0fdf4 !important;color:#333333 !important;padding:16px 20px 4px;margin:0 0 24px;border-radius:0 6px 6px 0;text-align:left;&quot;&gt;&lt;p style=&quot;margin:0 0 12px;font-size:16px;line-height:1.8;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;당장 할 수 있는 것&lt;/strong&gt; — 원인(설정 오류, 의존 서비스 미기동, 리소스 부족)을 먼저 고치고, 그다음 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;systemctl reset-failed &amp;lt;서비스&amp;gt;&lt;/code&gt;로 카운터를 초기화합니다. &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;man systemd.unit&lt;/code&gt;이 명시한 그대로 — 초기화하면 재시작 로직이 다시 활성화됩니다. 아무것도 안 해도 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;StartLimitIntervalUSec&lt;/code&gt; 창(기본 10초)이 지나면 다음 재시작 시도부터는 새 카운트로 취급됩니다만, &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;서비스가 여전히 죽는 상태라면 창이 지나도 다시 5번 만에 멈추는 게 반복될 뿐입니다.&lt;/strong&gt;&lt;/p&gt;
&lt;div style=&quot;display:block;float:none;position:static;background:#1e1e1e !important;color:#e6e6e6 !important;border-radius:8px;padding:18px 20px;margin:0 0 24px;overflow-x:auto;font-size:13.5px;line-height:1.7;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace !important;white-space:pre !important;tab-size:8;-webkit-text-size-adjust:100%;text-align:left;word-spacing:normal;text-indent:0;&quot;&gt;systemctl reset-failed &amp;lt;서비스&amp;gt;   # 원인 조치 후에만&lt;br&gt;systemctl restart &amp;lt;서비스&amp;gt;&lt;/div&gt;
&lt;p style=&quot;margin:0 0 12px;font-size:16px;line-height:1.8;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;지금 못 고치면 남겨 둘 것&lt;/strong&gt; — 원인을 바로 못 고치는 상황이면, &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;StartLimitBurst&lt;/code&gt;를 무작정 올리기보다 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;NRestarts&lt;/code&gt;를 알림 임계값으로 걸어 둡니다.&lt;/strong&gt; 값을 올려서 더 오래 재시도하게 만드는 건 &quot;더 오래 죽어 있다가 결국 멈춘다&quot;로 시간만 벌 뿐 — 근본적으로는 원인 해결이 우선입니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 12px;font-size:16px;line-height:1.8;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;&quot;&gt;StartLimitIntervalSec=0&lt;/code&gt;으로 두면 한도 자체를 끌 수 있다고 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;man systemd.unit&lt;/code&gt;에 나와 있지만(&lt;em style=&quot;display:inline;font-style:italic;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;&quot;may be set to 0 to disable any kind of rate limiting&quot;&lt;/em&gt;), 권장하지 않습니다 — 이 한도가 막아 주는 게 바로 &quot;무한 재시작 루프가 CPU·로그를 잡아먹는&quot; 상황이라, 끄면 원인 미해결 상태에서 그 상황을 그대로 허용하게 됩니다.&lt;/p&gt;&lt;/div&gt;
&lt;hr style=&quot;border:0;border-top:1px solid #e5e7eb;margin:44px 0;height:0;background:transparent !important;&quot;&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size:26px;line-height:1.4;font-weight:700;color:#1a1a1a;margin:56px 0 20px;padding-bottom:12px;border-bottom:2px solid #e5e7eb;letter-spacing:-0.3px;word-break:keep-all;text-align:left;background:transparent !important;&quot;&gt;6. 치트시트 — 정기 점검 명령&lt;/h2&gt;
&lt;div style=&quot;display:block;float:none;position:static;background:#1e1e1e !important;color:#e6e6e6 !important;border-radius:8px;padding:18px 20px;margin:0 0 24px;overflow-x:auto;font-size:13.5px;line-height:1.7;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace !important;white-space:pre !important;tab-size:8;-webkit-text-size-adjust:100%;text-align:left;word-spacing:normal;text-indent:0;&quot;&gt;systemctl show &amp;lt;서비스&amp;gt; -p NRestarts -p StartLimitBurst -p StartLimitIntervalUSec&lt;br&gt;                                                    # 한도 대비 현재 재시작 횟수&lt;br&gt;systemctl status &amp;lt;서비스&amp;gt; --no-pager -l            # 최근 로그와 함께 현재 상태&lt;br&gt;systemctl reset-failed &amp;lt;서비스&amp;gt;                    # 원인 해결 후 카운터 초기화&lt;/div&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;&lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;이 글이 보탠 것&lt;/strong&gt; — &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;Restart=always&lt;/code&gt;가 무조건 살려낸다는 가정이 왜 틀렸는지를 기본값(10초/5회) 그대로 실제로 소진시켜 확인했고, 이 카운터가 자동 재시작뿐 아니라 &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;사람이 손으로 재시작하는 것도 똑같이 센다&lt;/strong&gt;는 것을 &lt;code style=&quot;background:#f4f4f5 !important;color:#c7254e !important;border-radius:4px;padding:2px 6px;display:inline;font-size:15px;font-family:'D2Coding',Menlo,Consolas,'Courier New',monospace;overflow-wrap:anywhere;line-height:inherit;white-space:pre-wrap;font-weight:inherit;text-align:inherit;word-break:keep-all;white-space:nowrap;&quot;&gt;man&lt;/code&gt; 원전으로 확인했습니다.&lt;/p&gt;
&lt;p style=&quot;margin:0 0 20px;font-size:17px;line-height:1.9;color:#333333;text-align:left;background:transparent !important;&quot;&gt;1~3편(inode·fd·ephemeral 포트)이 모두 &quot;자원이 조용히 소진되는&quot; 신호였다면, 이번 건 성격이 다릅니다 — &lt;strong style=&quot;display:inline;font-weight:700;color:inherit;font-size:inherit;line-height:inherit;text-align:inherit;background:transparent !important;&quot;&gt;소진되는 건 자원이 아니라 &quot;다시 시도할 기회&quot;&lt;/strong&gt;입니다.&lt;/p&gt;
&lt;/div&gt;</description>
      <category>리눅스/장애  D-1일전</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/53</guid>
      <comments>https://wowpanel.tistory.com/entry/Start-request-repeated-too-quickly-%E2%80%94-%EC%84%9C%EB%B9%84%EC%8A%A4-flapping-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8#entry53comment</comments>
      <pubDate>Tue, 8 Sep 2026 07:58:32 +0900</pubDate>
    </item>
    <item>
      <title>문의 페이지</title>
      <link>https://wowpanel.tistory.com/pages/%EB%AC%B8%EC%9D%98</link>
      <description>&lt;h2 data-ke-size=&quot;size26&quot;&gt;문의&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;블로그와 관련된 모든 연락은 &amp;nbsp;이메일-댓글로 받습니다.&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.1em;&quot; data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.1em;&quot; data-ke-size=&quot;size16&quot;&gt;이런 연락을 환영합니다&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;내용 오류 제보&lt;/b&gt; &amp;mdash; 글에 적힌 명령어나 설명이 실제 환경과 다른 경우 좀 더 고민하겠습니다.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;오탈자 제보&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;주제 제안&lt;/b&gt; &amp;mdash; 다뤄줬으면 하는 장애나 명령어&lt;/li&gt;
&lt;li&gt;&lt;b&gt;질문&lt;/b&gt; &amp;mdash; 글 내용에 대한 추가 질문. 다만 개별 환경의 장애 진단을 대신 해드리기는 어렵습니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;답변에 대하여&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;1인이 운영하는 블로그이며 본업이 따로 있어, 답변까지 며칠이 걸릴 수 있습니다. 내용 오류 제보는 확인되는 대로 글을 수정하고 하단에 수정 이력을 남깁니다.&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;저작권&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이 블로그의 글은 직접 작성하고 실제 환경에서 검증한 것입니다. 인용 시 출처와 원문 링크를 남겨주세요. 전문 복제는 삼가 주시기 바랍니다.&lt;/p&gt;</description>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/pages/%EB%AC%B8%EC%9D%98</guid>
      <pubDate>Mon, 7 Sep 2026 23:11:46 +0900</pubDate>
    </item>
    <item>
      <title>이 블로그는 무엇을 쓰는 곳인가</title>
      <link>https://wowpanel.tistory.com/pages/%EC%86%8C%EA%B0%9C</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;리눅스 서버와 AWS, 스프링부트를 운영하면서 실제로 마주친 장애와 그 원인을 기록하는 블로그입니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&quot;재부팅했더니 됐습니다&quot;로 끝나는 기록은 쓰지 않습니다. &lt;b&gt;어떤 신호가 먼저 있었는지, 그 신호를 어떤 명령으로 볼 수 있었는지, 같은 일이 다시 생기면 무엇을 먼저 확인해야 하는지&lt;/b&gt;를 씁니다.&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;왜 이렇게 쓰는가&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;장애가 났을 때 검색하면 대부분 두 종류의 글이 나옵니다. 하나는 명령어만 나열된 글이고, 다른 하나는 원인 설명 없이 해결책만 있는 글입니다. 둘 다 &lt;b&gt;지금 내 서버에서 벌어지는 일이 그 상황과 같은 것인지&lt;/b&gt;를 알려주지 않습니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;그래서 이 블로그는 순서를 뒤집었습니다. 증상에서 시작해, 그 증상이 나올 수 있는 원인을 갈라내고, 각 갈래를 어떤 명령으로 확인하는지까지 씁니다. 명령어는 결론이 아니라 &lt;b&gt;판단의 근거를 얻는 도구&lt;/b&gt;로 다룹니다.&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;어떻게 검증하는가&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;모든 명령어와 출력은 실제 서버에서 실행한 결과를 그대로 붙입니다.&lt;/b&gt; 주로 Rocky Linux 9.x 환경이며, 버전이 중요한 경우 글 안에 명시합니다.&lt;/li&gt;
&lt;li&gt;직접 확인하지 못한 내용은 &quot;확인 필요&quot;라고 명시하고, 추측을 사실처럼 쓰지 않습니다.&lt;/li&gt;
&lt;li&gt;잘못된 내용을 발견하면 글을 수정하고, 하단에 수정 이력을 남깁니다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;다루는 주제&lt;/h2&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;&lt;b&gt;리눅스&lt;/b&gt; &amp;mdash; 프로세스와 부하, 메모리, 디스크와 파일, 네트워크, 로그 추적, 서비스&amp;middot;권한&amp;middot;쉘&lt;/li&gt;
&lt;li&gt;&lt;b&gt;장애 D-1일 전&lt;/b&gt; &amp;mdash; inode 고갈, 파일 디스크립터 고갈, ephemeral 포트 고갈처럼 &lt;i&gt;터지기 전에 먼저 보이는 신호&lt;/i&gt;를 다루는 시리즈&lt;/li&gt;
&lt;li&gt;&lt;b&gt;AWS&lt;/b&gt; &amp;mdash; VPC, EC2, S3, RDS, IAM, Route 53, ELB 등을 &lt;i&gt;온프레미스에서 쓰던 장비 감각으로&lt;/i&gt; 읽는 시리즈&lt;/li&gt;
&lt;li&gt;&lt;b&gt;MariaDB&lt;/b&gt; &amp;mdash; 커넥션, 락, 슬로우 쿼리, 복제 중단 등 운영 중 실제로 만나는 오류&lt;/li&gt;
&lt;li&gt;&lt;b&gt;스프링부트&lt;/b&gt; &amp;mdash; 기동 실패, 빈 주입, 트랜잭션, 커넥션 풀 등 애플리케이션 레이어의 장애&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;하나의 장애를 &lt;b&gt;애플리케이션 &amp;middot; 데이터베이스 &amp;middot; 운영체제&lt;/b&gt; 세 층에서 각각 다루는 것을 목표로 하고 있습니다. 같은 &quot;커넥션 고갈&quot;도 앱에서 보는 모습과 DB에서 보는 모습, OS에서 보는 모습이 다르기 때문입니다.&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;누가 쓰는가&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;온프레미스 인프라와 클라우드를 다루고 있고, 자바 개발자입니다. &amp;nbsp;물리 서버와 사내망을 직접 다루던 감각으로 AWS를 읽는 관점을 주로 씁니다. 그 감각이 클라우드를 이해하는 데 오히려 지름길이 되는 경우가 많았기 때문입니다.&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;업데이트&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;평일 기준 매일 한 편씩 발행합니다. 새 글은 오전에 올라갑니다.&lt;/p&gt;
&lt;h2 data-ke-size=&quot;size26&quot;&gt;문의&lt;/h2&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;오탈자 제보, 내용 오류 지적, 다뤄줬으면 하는 주제 제안 모두 환영합니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이메일: wowpanel.seo@gmail.com&lt;/p&gt;</description>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/pages/%EC%86%8C%EA%B0%9C</guid>
      <pubDate>Mon, 7 Sep 2026 23:09:59 +0900</pubDate>
    </item>
    <item>
      <title>Cannot assign requested address &amp;mdash; ephemeral 포트 고갈, 장애 하루 전 신호</title>
      <link>https://wowpanel.tistory.com/entry/Cannot-assign-requested-address-%E2%80%94-ephemeral-%ED%8F%AC%ED%8A%B8-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;바깥으로 나가는 연결을 만드는 모든 프로그램은 로컬 포트를 하나씩 씁니다. 이 포트는 무한하지 않고, 연결을 끊어도 한동안 회수되지 않습니다. 이 상태가 쌓이면 &lt;b&gt;새 연결 자체를 못 만듭니다&lt;/b&gt; &amp;mdash; 원격 서버는 멀쩡하고, 방화벽도 안 막았는데 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Cannot assign requested address&lt;/code&gt;가 뜹니다. 이 글은 이 신호를 어떻게 미리 보는지, 흔히 오해하는 설정 하나를 실측으로 바로잡고, 실제로 포트를 고갈시켜 같은 에러를 재현합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;화요일 오전, 결제 게이트웨이 연동 서버&lt;/b&gt; &amp;mdash; 외부 API를 호출하는 배치가 트래픽이 몰리는 시간대에 실패하기 시작했다. 로그엔 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;connect: Cannot assign requested address&lt;/code&gt;. 담당자는 방화벽&amp;middot;DNS&amp;middot;상대 서버 상태를 다 확인했지만 전부 정상이었다. 원인은 그 배치가 &lt;b&gt;API 호출마다 새 TCP 연결을 열고 바로 닫는&lt;/b&gt; 구조였다는 것 &amp;mdash; 끊은 연결은 즉시 없어지지 않고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;으로 남아 로컬 포트를 붙잡는다. 트래픽이 몰리자 열어 둘 수 있는 포트 자체가 바닥났다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ss -s&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;timewait&lt;/code&gt; 카운트는 이 상태가 얼마나 진행됐는지 보여주는 계기판입니다. 이 글에서는 그 계기판을 읽는 법, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;의 지속 시간을 좌우한다고 흔히 오해하는 설정을 실측으로 확인하고, 실제로 포트를 고갈시켜 봅니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;측정 환경: Rocky Linux 9.7(커널 5.14.0-611.47.1.el9_7) &amp;middot; util-linux 2.37.4(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;unshare&lt;/code&gt;) &amp;middot; iproute2(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ss&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ip&lt;/code&gt;) &amp;middot; Ncat 7.92(nmap). 이 글의 모든 명령 출력은 이 환경에서 직접 실행해 얻은 것입니다.&lt;/blockquote&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;신호 관찰 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ss -s&lt;/code&gt;의 timewait과 포트 범위&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;왜 위험한가 &amp;mdash; 그리고 흔한 오해 하나를 실측으로 바로잡기&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;재현 &amp;mdash; 포트 11개로 좁혀서 실제로 고갈시켜 봅니다&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;임계값과 오탐 &amp;mdash; 몇 %부터, 그리고 아닌 경우&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;지금 조치 &amp;mdash; 포트를 늘릴지, 연결을 줄일지&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;치트시트 &amp;mdash; 정기 점검 명령&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. 신호 관찰 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ss -s&lt;/code&gt;의 timewait과 포트 범위&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ ss -s&lt;br /&gt;Total: 961&lt;br /&gt;TCP:&amp;nbsp;&amp;nbsp;&amp;nbsp;373 (estab 60, closed 292, orphaned 0, timewait 142)&lt;br /&gt;&lt;br /&gt;Transport Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IPv6&lt;br /&gt;RAW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&lt;br /&gt;UDP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3&lt;br /&gt;TCP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;81&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;49&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;32&lt;br /&gt;INET&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;89&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;53&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;36&lt;br /&gt;FRAG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;&lt;br /&gt;$ cat /proc/sys/net/ipv4/ip_local_port_range&lt;br /&gt;32768&amp;nbsp;&amp;nbsp;&amp;nbsp;60999&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;timewait 142&lt;/code&gt;는 절대 개수만으로는 별 의미가 없습니다. 봐야 할 건 &lt;b&gt;이 서버가 쓸 수 있는 로컬 포트 범위(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ip_local_port_range&lt;/code&gt;) 대비 얼마나 차 있는가&lt;/b&gt;입니다. 이 서버는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;32768~60999&lt;/code&gt;, 즉 28,232개 중 142개(0.5%)라 전혀 위험하지 않습니다. 이 비율이 문제가 되는 건 &lt;b&gt;아웃바운드 연결을 짧은 주기로 열고 닫는 프로세스가, 대상 목적지가 소수로 좁을 때&lt;/b&gt;입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ ss -tan state time-wait | wc -l&lt;br /&gt;143&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;(헤더 줄 하나가 포함되므로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ss -s&lt;/code&gt;의 142보다 1 많습니다.)&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ss -tan state time-wait&lt;/code&gt;은 로컬에서 만든 아웃바운드 연결도, 남이 나에게 연결했다가 끊은 인바운드 연결도 둘 다 보여줍니다. 특정 목적지가 원인인지 좁히려면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ss -tan state time-wait &quot;( dport = :목적지포트 )&quot;&lt;/code&gt;처럼 필터를 겁니다.&lt;/blockquote&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 왜 위험한가 &amp;mdash; 그리고 흔한 오해 하나를 실측으로 바로잡기&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;TCP 연결을 만들 때 로컬 쪽은 &lt;b&gt;(로컬 IP, 로컬 포트, 원격 IP, 원격 포트)&lt;/b&gt; 조합 하나를 씁니다. 같은 목적지로 계속 연결한다면 사실상 &lt;b&gt;로컬 포트 하나가 그 목적지 하나를 위해 소비&lt;/b&gt;되는 셈입니다. 연결을 닫아도 그 포트는 즉시 재사용되지 않습니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt; 상태로 남아 지연 도착한 패킷과 이전 연결을 혼동하지 않도록 커널이 붙잡아 둡니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;여기서 흔한 오해가 있습니다&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;net.ipv4.tcp_fin_timeout&lt;/code&gt;을 낮추면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;이 빨리 풀린다고 알려져 있는데, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tcp&lt;/code&gt;는 이렇게 못 박습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;tcp_fin_timeout&lt;/b&gt; This specifies how many seconds to wait for a final FIN packet before the socket is forcibly closed.&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이건 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;FIN_WAIT&lt;/code&gt; 계열(상대가 안 끊어서 붕 뜬 소켓)의 이야기지, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;과는 다른 상태입니다. 실제로 확인해 봤습니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tcp_fin_timeout&lt;/code&gt;을 기본값(60)의 12분의 1인 &lt;b&gt;5&lt;/b&gt;로 낮추고, 연결 하나를 열었다 바로 닫은 뒤 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;이 몇 초 만에 사라지는지 5초 간격으로 쟀습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ unshare -rn bash -c '&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip link set lo up&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo 5 &amp;gt; /proc/sys/net/ipv4/tcp_fin_timeout&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cat /proc/sys/net/ipv4/tcp_fin_timeout&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ncat -lk 127.0.0.1 9999 &amp;amp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sleep 0.3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ncat -w1 127.0.0.1 9999 &amp;lt;/dev/null&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;# 연결 1회 생성 후 즉시 close&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;START=$(date +%s)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for k in $(seq 1 20); do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;N=$(ss -tan state time-wait &quot;( dport = :9999 )&quot; | tail -n +2 | wc -l)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NOW=$(date +%s)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;t=$((NOW-START))s timewait_count=$N&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[ &quot;$N&quot; -eq 0 ] &amp;amp;&amp;amp; break&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sleep 5&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;done&lt;br /&gt;&amp;nbsp;&amp;nbsp;'&lt;br /&gt;5&lt;br /&gt;t=0s timewait_count=1&lt;br /&gt;t=5s timewait_count=1&lt;br /&gt;t=10s timewait_count=1&lt;br /&gt;t=15s timewait_count=1&lt;br /&gt;t=20s timewait_count=1&lt;br /&gt;t=25s timewait_count=1&lt;br /&gt;t=30s timewait_count=1&lt;br /&gt;t=35s timewait_count=1&lt;br /&gt;t=40s timewait_count=1&lt;br /&gt;t=45s timewait_count=1&lt;br /&gt;t=50s timewait_count=1&lt;br /&gt;t=55s timewait_count=1&lt;br /&gt;t=60s timewait_count=1&lt;br /&gt;t=65s timewait_count=0&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tcp_fin_timeout=5&lt;/code&gt;인데도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;은 &lt;b&gt;60~65초&lt;/b&gt; 사이에 사라졌습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tcp_fin_timeout&lt;/code&gt;을 아무리 낮춰도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt; 지속 시간은 그대로입니다 &amp;mdash; 이 값은 리눅스 커널에 고정돼 있고 일반적인 sysctl로 바꿀 수 없습니다. &lt;b&gt;&quot;이 서버는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tcp_fin_timeout&lt;/code&gt;을 낮춰 놨으니 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;이 금방 빠진다&quot;는 가정은 틀렸습니다.&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #6b7280; background: #f9fafb !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;을 실제로 줄이는 sysctl은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tcp_tw_reuse&lt;/code&gt;입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tcp&lt;/code&gt;: &lt;i&gt;&quot;Allow to reuse TIME_WAIT sockets for new connections when it is safe from protocol viewpoint.&quot;&lt;/i&gt; 이 서버의 기본값은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;2&lt;/code&gt;입니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man&lt;/code&gt;은 아직 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Boolean&lt;/code&gt;으로만 설명하는데, 최신 커널은 0/1/2 세 단계를 씁니다. 정확한 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;2&lt;/code&gt;의 의미는 이 서버에 커널 문서 패키지가 없어 원전으로 확인하지 못했습니다 &amp;mdash; 이 값을 근거로 판단을 내려야 한다면 커널 소스나 배포판 문서로 한 번 더 확인하시길 권합니다.&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 재현 &amp;mdash; 포트 11개로 좁혀서 실제로 고갈시켜 봅니다&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;운영 서버의 실제 포트 범위를 건드릴 수는 없으니, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;unshare -rn&lt;/code&gt;으로 새 네트워크 네임스페이스를 열어 그 안에서만 유효한 루프백을 만들고 포트 범위를 극단적으로 좁힙니다. 호스트에는 영향이 없고, 셸이 끝나면 사라집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ unshare -rn bash -c '&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ip link set lo up&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo 32768 32778 &amp;gt; /proc/sys/net/ipv4/ip_local_port_range&amp;nbsp;&amp;nbsp;&amp;nbsp;# 11개 포트만&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cat /proc/sys/net/ipv4/ip_local_port_range&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ncat -lk 127.0.0.1 9999 &amp;amp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sleep 0.3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo ---BASELINE---&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ss -s&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo ---연결 시도 30회---&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ok=0; fail=0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for i in $(seq 1 30); do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if ncat -w1 127.0.0.1 9999 &amp;lt;/dev/null 2&amp;gt;/tmp/ncat_err.txt; then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ok=$((ok+1))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fail=$((fail+1))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;done&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;성공 $ok &amp;middot; 실패 $fail&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo ---마지막 실패 메시지---&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cat /tmp/ncat_err.txt&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo ---AFTER---&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ss -s&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ss -tan state time-wait | head -5&lt;br /&gt;&amp;nbsp;&amp;nbsp;'&lt;br /&gt;32768&amp;nbsp;&amp;nbsp;&amp;nbsp;32778&lt;br /&gt;---BASELINE---&lt;br /&gt;Total: 1&lt;br /&gt;TCP:&amp;nbsp;&amp;nbsp;&amp;nbsp;229 (estab 0, closed 228, orphaned 0, timewait 0)&lt;br /&gt;&lt;br /&gt;Transport Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IPv6&lt;br /&gt;RAW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;UDP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;TCP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;INET&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;FRAG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;&lt;br /&gt;---연결 시도 30회---&lt;br /&gt;성공 13 &amp;middot; 실패 17&lt;br /&gt;---마지막 실패 메시지---&lt;br /&gt;Ncat: Cannot assign requested address.&lt;br /&gt;---AFTER---&lt;br /&gt;Total: 1&lt;br /&gt;TCP:&amp;nbsp;&amp;nbsp;&amp;nbsp;241 (estab 0, closed 240, orphaned 0, timewait 11)&lt;br /&gt;&lt;br /&gt;Transport Total&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IPv6&lt;br /&gt;RAW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;UDP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;TCP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;INET&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;FRAG&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&lt;br /&gt;&lt;br /&gt;Recv-Q Send-Q Local Address:Port&amp;nbsp;&amp;nbsp;Peer Address:Port&lt;br /&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;127.0.0.1:32773&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;127.0.0.1:9999&lt;br /&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;127.0.0.1:32778&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;127.0.0.1:9999&lt;br /&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;127.0.0.1:32775&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;127.0.0.1:9999&lt;br /&gt;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;127.0.0.1:32776&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;127.0.0.1:9999&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;11개짜리 포트 범위에서 연결을 30번 반복하니 &lt;b&gt;13번째까지만 성공하고 나머지 17번은 전부 실패&lt;/b&gt;했습니다. 실패 메시지는 정확히 도입부 상황의 그 메시지 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Cannot assign requested address&lt;/code&gt;(errno &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;EADDRNOTAVAIL&lt;/code&gt;)입니다. 성공했던 연결 13개 중 남은 것들이 전부 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;으로 쌓여 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;timewait 11&lt;/code&gt;(포트 범위 11개와 정확히 일치)을 만든 뒤로는, 그 포트들이 60초 동안 풀리기 전까지 &lt;b&gt;어떤 새 연결도 이 목적지로는 못 나갑니다.&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #dc2626; background: #fef2f2 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 실패는 &lt;b&gt;연결을 시도하는 쪽에서만&lt;/b&gt; 일어납니다. 서버(리스닝 소켓) 쪽은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SO_REUSEADDR&lt;/code&gt;을 쓰면 자기 포트를 바로 재사용해서 다시 뜰 수 있어 이 문제와 무관합니다. &lt;b&gt;아웃바운드 연결을 만드는 클라이언트&amp;middot;배치&amp;middot;연동 서버가 이 증상의 당사자&lt;/b&gt;입니다.&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 임계값과 오탐 &amp;mdash; 몇 %부터, 그리고 아닌 경우&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ip_local_port_range&lt;/code&gt;의 크기 대비 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;timewait&lt;/code&gt; 개수 비율로 봅니다. 1&amp;middot;2편과 같은 관례(경고 80% &amp;middot; 위험 90%)를 적용할 수 있지만, 이 자원은 &lt;b&gt;목적지별로 쪼개집니다&lt;/b&gt; &amp;mdash; 전체 포트 범위가 넉넉해도 특정 목적지 하나로 몰리는 연결이 그 목적지에 배정 가능한 포트를 다 쓰면 그 목적지로만 못 나갑니다. 전체 비율과 함께 &lt;b&gt;목적지별 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt; 개수&lt;/b&gt;도 같이 봐야 합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;ss -tan state time-wait &quot;( dport = :목적지포트 )&quot; | wc -l&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;오탐 주의 &amp;mdash; 이 신호인데 장애로 안 이어지는 경우&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;상황&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;왜 괜찮은가&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;timewait&lt;/code&gt; 절대 개수는 크지만 목적지가 다양하게 분산됨&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;목적지마다 별도의 포트 풀을 쓰는 게 아니라 전체 범위를 나눠 쓰는 것 &amp;mdash; 특정 목적지 하나가 포트를 독점하지 않으면 그 목적지로의 새 연결은 계속 됩니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tcp_tw_reuse&lt;/code&gt;가 활성화(이 서버 기본값 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;2&lt;/code&gt;)돼 있고 클라이언트 쪽 연결&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&quot;안전할 때&quot; 재사용되므로 순수 개수만큼 위험하지 않을 수 있음 &amp;mdash; 다만 정확한 재사용 조건은 원전 확인이 안 됐으니 개수 자체가 계속 우상향하는지는 여전히 지켜봐야 함&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서버(리스닝) 소켓이 재시작 후 잠깐 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt;을 남김&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SO_REUSEADDR&lt;/code&gt;을 쓰는 서버 소켓은 재바인딩에 지장이 없음 &amp;mdash; 이 글의 위험은 아웃바운드(클라이언트) 쪽 이야기&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;배치가 끝난 직후 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;timewait&lt;/code&gt;이 일시적으로 튀었다가 다음 배치 전에 원래 수준으로 돌아옴&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;60초짜리 창이 지나면 자연히 풀림 &amp;mdash; 다음 배치가 시작되기 전에 여유 있게 풀린다면 급한 신호가 아님&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 지금 조치 &amp;mdash; 포트를 늘릴지, 연결을 줄일지&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #16a34a; background: #f0fdf4 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;당장 할 수 있는 것&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ip_local_port_range&lt;/code&gt;를 넓힙니다(예: &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;32768 60999&lt;/code&gt; &amp;rarr; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;1024 65000&lt;/code&gt;, 다른 서비스가 쓰는 낮은 포트와 안 겹치는지 확인 후). 포트 풀이 커지면 같은 목적지로도 더 많은 연결을 동시에 감당합니다. 임시 완화일 뿐, 연결 패턴 자체는 그대로입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;sysctl -w net.ipv4.ip_local_port_range=&quot;1024 65000&quot; # 즉시 적용, 재부팅 시 소실&lt;br /&gt;# 영구 적용은 /etc/sysctl.d/*.conf 에 net.ipv4.ip_local_port_range = 1024 65000 추가&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;근본 조치&lt;/b&gt; &amp;mdash; 이 신호의 진짜 원인은 대부분 &quot;연결을 재사용하지 않는 코드&quot;입니다. HTTP 클라이언트라면 keep-alive&amp;middot;커넥션 풀을 켜서 같은 목적지로의 연결을 재사용하고, DB 클라이언트라면 매 요청마다 새로 접속하지 않고 커넥션 풀을 씁니다. &lt;b&gt;연결 자체가 줄면 포트 소비도 같이 줍니다&lt;/b&gt; &amp;mdash; 포트 범위를 넓히는 건 증상 완화지, 원인 제거가 아닙니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;지금 못 고치면 남겨 둘 것&lt;/b&gt; &amp;mdash; 코드를 당장 못 고치는 상황이면, 목적지별 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;timewait&lt;/code&gt; 개수를 알림 임계값으로 걸어 둡니다. 트래픽이 몰리는 시간대 직전에 미리 확인하는 루틴이 없다면 하나 만들어 둡니다.&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 치트시트 &amp;mdash; 정기 점검 명령&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;ss -s # timewait 전체 개수&lt;br /&gt;cat /proc/sys/net/ipv4/ip_local_port_range # 전체 포트 풀 크기&lt;br /&gt;ss -tan state time-wait &quot;( dport = :포트 )&quot; | wc -l # 특정 목적지로 쏠렸는지&lt;br /&gt;cat /proc/sys/net/ipv4/tcp_tw_reuse # 재사용 설정 확인 (기본값이 뭔지 먼저 확인)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;이 글이 보탠 것&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tcp_fin_timeout&lt;/code&gt;이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TIME_WAIT&lt;/code&gt; 지속 시간과 무관하다는 것을 5초로 낮춰도 60~65초를 그대로 기다리는 실측으로 확인했고, 포트 범위를 11개로 좁혀 실제로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Cannot assign requested address&lt;/code&gt;를 재현해 도입부 상황과 같은 실패를 만들어 봤습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;1&amp;middot;2편과 마찬가지로, 이 신호도 &lt;b&gt;익숙한 설정 하나(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tcp_fin_timeout&lt;/code&gt;)가 실제로는 다른 걸 조절하고 있었다&lt;/b&gt;는 함정이 핵심입니다 &amp;mdash; inode의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;, fd의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof&lt;/code&gt;에 이어 세 번째입니다.&lt;/p&gt;
&lt;/div&gt;
&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/df-h%EB%8A%94-%EC%97%AC%EC%9C%A0-%EC%9E%88%EB%8A%94%EB%8D%B0-%ED%8C%8C%EC%9D%BC%EC%9D%B4-%EC%95%88-%EB%A7%8C%EB%93%A4%EC%96%B4%EC%A7%91%EB%8B%88%EB%8B%A4-%E2%80%94-inode-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8&quot;&gt;같은 방식으로 inode가 고갈되는 경우&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/lsof%EB%A1%9C-%EC%84%B8%EB%A9%B4-%EC%95%88-%EB%B3%B4%EC%9E%85%EB%8B%88%EB%8B%A4-%E2%80%94-%ED%8C%8C%EC%9D%BC-%EB%94%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%84%B0-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8&quot;&gt;같은 방식으로 파일 디스크립터가 고갈되는 경우&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/ALB%C2%B7NLB%C2%B7CLB-%E2%80%94-L4L7-%EC%8A%A4%EC%9C%84%EC%B9%98-%ED%95%9C-%EB%8C%80%EA%B0%80-%EC%84%B8-%EA%B0%88%EB%9E%98%EB%A1%9C-%EB%82%98%EB%89%9C-%EC%9D%B4%EC%9C%A0&quot;&gt;로드밸런서 뒤에서 이 문제가 먼저 터지는 이유&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>리눅스/장애  D-1일전</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/52</guid>
      <comments>https://wowpanel.tistory.com/entry/Cannot-assign-requested-address-%E2%80%94-ephemeral-%ED%8F%AC%ED%8A%B8-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8#entry52comment</comments>
      <pubDate>Mon, 7 Sep 2026 09:57:39 +0900</pubDate>
    </item>
    <item>
      <title>S3 &amp;mdash; &amp;quot;NAS 마운트&amp;quot; 감각으로 열면 바로 걸리는 AWS의 오브젝트 스토리지</title>
      <link>https://wowpanel.tistory.com/entry/S3-%E2%80%94-NAS-%EB%A7%88%EC%9A%B4%ED%8A%B8-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%97%B4%EB%A9%B4-%EB%B0%94%EB%A1%9C-%EA%B1%B8%EB%A6%AC%EB%8A%94-AWS%EC%9D%98-%EC%98%A4%EB%B8%8C%EC%A0%9D%ED%8A%B8-%EC%8A%A4%ED%86%A0%EB%A6%AC%EC%A7%80</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 여러 서버가 같은 파일을 함께 봐야 할 때는 NAS(Network Attached Storage &amp;mdash; 네트워크로 파일을 공유하는 전용 저장장치)를 세우고 NFS(Network File System)나 SMB(Server Message Block)로 마운트해 디렉터리 트리를 공유합니다. AWS에서 이에 가장 가까운 서비스는 Amazon S3(Simple Storage Service)이지만, 저장 방식 자체가 근본적으로 다릅니다. 이 글은 그 차이가 실무에서 정확히 어디서 걸리는지, &quot;마운트해서 쓰면 되겠지&quot;라는 첫 시도가 왜 막히는지부터 다룹니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 NAS를 세워 애플리케이션 업로드 파일을 여러 웹 서버가 함께 보도록 운영해 온 인프라팀이, 신규 서비스의 파일 저장소를 S3로 옮기라는 지시를 받았다. &quot;그냥 네트워크 드라이브 마운트하듯 버킷을 마운트해서 쓰면 되겠지&quot;라는 생각으로 콘솔에 들어갔는데, 마운트 메뉴 자체가 안 보인다는 데서 시작한다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글은 실제 AWS 콘솔 화면이나 CLI(Command Line Interface &amp;mdash; 명령줄로 AWS를 조작하는 도구) 실행 결과를 캡처하지 않습니다 &amp;mdash; 이 프로젝트로 쓸 수 있는 AWS 계정이 없기 때문입니다. S3의 저장 모델, 버킷 이름 규칙, 스토리지 클래스별 특성, 접근 제어 기본값, 라이프사이클 규칙처럼 이 글이 다루는 사실 하나하나는 전부 AWS 공식 문서를 직접 열어 원문을 대조한 것입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;S3가 정확히 뭔가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;온프레미스 대응표&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;실무에서 반드시 알아야 하는 것&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;온프레미스 관리자가 자주 하는 오해&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;비용&amp;middot;운영 감각&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;관련 개념&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s7&quot;&gt;한눈에 정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. S3가 정확히 뭔가&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서는 S3를 이렇게 정의합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&quot;오브젝트 스토리지&quot;라는 말이 핵심입니다. NAS는 파일 시스템을 네트워크로 공유하는 장치라 그 안에 실제 디렉터리 트리가 있지만, S3는 구조 자체가 다릅니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon S3 is an object storage service that stores data as objects, hierarchical data, or tabular data within buckets. An object is a file and any metadata that describes the file. A bucket is a container for objects.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;버킷은 컨테이너, 객체는 파일과 그 메타데이터, 그리고 객체마다 버킷 안에서 유일한 키(key)가 붙습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;An object key (or key name) is the unique identifier for an object within a bucket. Every object in a bucket has exactly one key.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;버킷을 만들 때 리전을 지정하고, 그 안의 객체는 명시적으로 옮기지 않는 한 그 리전을 벗어나지 않습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Objects stored in an AWS Region never leave the Region unless you explicitly transfer or replicate them to another Region.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;여기까지는 NAS와 크게 다르지 않아 보일 수 있습니다. &quot;네트워크 너머 어딘가에 있는 저장 공간에, 이름 붙여서 파일을 넣어 둔다&quot;는 감각 자체는 비슷합니다. 하지만 접근 방식과 내부 구조에서 갈립니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;접근 방식&lt;/b&gt; &amp;mdash; NAS는 마운트해서 로컬 디렉터리처럼 다룹니다. S3에는 마운트라는 개념이 없습니다. 콘솔, CLI, REST API(Application Programming Interface &amp;mdash; 프로그램끼리 정해진 규칙으로 주고받는 호출 인터페이스) 호출로 객체를 올리고 내립니다. 객체 하나는 버킷 이름&amp;middot;리전&amp;middot;키를 조합한 HTTPS 엔드포인트 URL로 주소가 매겨집니다 &amp;mdash; 파일 경로가 아니라 HTTP 엔드포인트입니다. 이 오해는 4장에서 도입부 상황과 함께 자세히 다룹니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;내부 구조&lt;/b&gt; &amp;mdash; NAS의 디렉터리는 실제 계층 구조지만, S3는 버킷 안에 객체가 평평하게(flat) 늘어선 구조입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The Amazon S3 data model is a flat structure: You create a bucket, and the bucket stores objects. There is no hierarchy of subbuckets or subfolders.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;콘솔에서 보이는 &quot;폴더&quot;는 진짜 디렉터리가 아니라 키 이름의 접두사(prefix)와 구분자(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/&lt;/code&gt;)로 흉내 낸 것입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Development/Projects.xlsx&lt;/code&gt;라는 객체는 실제로는 그 전체 문자열이 하나의 키일 뿐이고, 콘솔이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/&lt;/code&gt; 앞부분을 &quot;Development&quot;라는 폴더로 묶어 보여주는 것뿐입니다. 콘솔에서 폴더를 만들면 그 뒤에서는 이런 일이 일어납니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The Amazon S3 console implements folder object creation by creating a zero-byte object with the folder prefix and delimiter value as the key. These folder objects don't appear in the console.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 &quot;폴더&quot;는 콘솔이 편의상 만든 0바이트짜리 객체거나, 순전히 화면에만 존재하는 시각적 묶음입니다. 이 차이는 4장의 두 번째 오해로 이어집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2160&quot; data-origin-height=&quot;1040&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/3mhwV/dJMcablhOPb/n5oHnYCAA0AaNFVMTZpFz1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/3mhwV/dJMcablhOPb/n5oHnYCAA0AaNFVMTZpFz1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/3mhwV/dJMcablhOPb/n5oHnYCAA0AaNFVMTZpFz1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F3mhwV%2FdJMcablhOPb%2Fn5oHnYCAA0AaNFVMTZpFz1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2160&quot; height=&quot;1040&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2160&quot; data-origin-height=&quot;1040&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 온프레미스 대응표&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 목적(여러 서버가 같은 데이터를 공유)을 이루는 방식이 근본적으로 다릅니다.&lt;/b&gt; 이름과 쓰임새가 비슷해 보여도 &quot;같은 물건&quot;으로 여기고 접근하면 3장&amp;middot;4장에서 다루는 실무 문제로 바로 이어집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;온프레미스 NAS&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;AWS S3&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;같은 점&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;다른 점&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NFS&amp;middot;SMB로 마운트해 접근&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;REST API&amp;middot;콘솔&amp;middot;CLI로 접근&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;여러 서버가 같은 데이터를 공유&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;마운트가 아니라 API 호출(1장, 4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;실제 디렉터리 트리&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;버킷 안 평평한 키 네임스페이스&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;콘솔에서 폴더처럼 보임&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;진짜 계층 구조가 없다(1장, 4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;RAID 컨트롤러 + 정기 백업&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;스토리지 클래스별로 설계된 내구성&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;데이터 유실 방지&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;여러 데이터센터에 자동 복제, 직접 구성 안 함(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;디스크 증설&amp;middot;컨트롤러 교체로 용량 계획&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;프로비저닝 없는 무제한 저장&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&amp;mdash;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;용량을 미리 계획할 필요 자체가 없다(5장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;파일 시스템 접근 권한&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;버킷 정책&amp;middot;계정 권한 정책 + 기본 차단 설정&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;접근 통제&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본값부터 강하게 잠겨 있다(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;스냅샷을 별도로 구성&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;S3 버저닝(옵션, 버킷 단위)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;이전 버전 복구&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본은 꺼짐, 켜면 지운 것도 그대로 남는다(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 실무에서 반드시 알아야 하는 것&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;버킷 이름은 전역에서 유일해야 하고, 만든 뒤엔 이름도 리전도 못 바꾼다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;버킷 이름은 계정 하나만의 문제가 아닙니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;General purpose buckets exist in a global namespace, which means that each bucket name must be unique across all AWS accounts in all the AWS Regions within a partition.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이름 규칙도 정해져 있습니다 &amp;mdash; 3자에서 63자 사이, 소문자&amp;middot;숫자&amp;middot;마침표&amp;middot;하이픈만 가능, 시작과 끝은 문자나 숫자여야 하고, IP 주소 형식(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;192.168.5.4&lt;/code&gt; 같은)은 쓸 수 없습니다. 그리고 한 번 만들면 되돌릴 수 없는 결정입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;After you create a general purpose bucket, you can't change its name or Region.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;버킷을 지워도 그 이름이 곧바로 내 것으로 다시 확보되는 건 아닙니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;After you delete a bucket in the shared global namespace, be aware that another AWS account in the same partition can use the same bucket name for a new bucket and can therefore potentially receive requests intended for the deleted bucket.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;스토리지 클래스는 접근 빈도로 고른다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;S3는 객체마다 스토리지 클래스를 지정할 수 있고, 기본값은 S3 Standard입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;By default, objects in S3 are stored in the S3 Standard storage class, however Amazon S3 offers a range of other storage classes for the objects that you store.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서가 정리한 주요 클래스 비교표는 다음과 같습니다. 클래스 이름에 붙은 IA는 Infrequent Access, 즉 &quot;자주 접근하지 않는다&quot;는 뜻입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;스토리지 클래스&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;접근 빈도&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;내구성&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;가용성&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;데이터센터 수&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;최소 저장 기간&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;S3 Standard&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;월 1회 이상&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.999999999%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.99%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;3곳 이상&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;없음&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;S3 Standard-IA&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;월 1회&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.999999999%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.9%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;3곳 이상&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;30일&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;S3 Intelligent-Tiering&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;변동&amp;middot;불명&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.999999999%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.9%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;3곳 이상&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;없음&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;S3 One Zone-IA&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;월 1회, 재생성 가능&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.999999999%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.5%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;1곳&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;30일&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;S3 Glacier Instant Retrieval&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;분기 1회&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.999999999%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.9%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;3곳 이상&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;90일&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;S3 Glacier Flexible Retrieval&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;연 1회&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.999999999%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.99%(복원 후)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;3곳 이상&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;90일&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;S3 Glacier Deep Archive&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;연 1회 미만&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.999999999%&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;99.99%(복원 후)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;3곳 이상&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;180일&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;눈여겨볼 건 &lt;b&gt;내구성과 가용성이 별개 숫자&lt;/b&gt;라는 점입니다 &amp;mdash; 내구성은 &quot;데이터를 잃어버리지 않을 확률&quot;, 가용성은 &quot;필요할 때 바로 접근할 수 있을 확률&quot;입니다. 표의 모든 클래스가 내구성은 동일하게 11개의 9로 설계되어 있지만, 가용성과 AZ(Availability Zone &amp;mdash; 같은 리전 안에서 전력&amp;middot;냉각&amp;middot;네트워크가 서로 독립된 데이터센터 그룹) 수는 클래스마다 다릅니다. One Zone-IA만 유일하게 단일 AZ에 저장되고, 나머지는 3곳 이상의 AZ에 걸쳐 저장됩니다. 이 차이는 4장에서 다시 다룹니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;객체 하나의 크기 제한과 업로드 방식&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;객체 키 이름은 최대 1,024바이트까지 쓸 수 있습니다. 업로드 방식은 크기에 따라 갈립니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The maximum size of a file that you can upload by using the Amazon S3 console is 160 GB.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;콘솔이 아니라 API&amp;middot;CLI로 단일 요청을 보낼 때는 이보다 작습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;With a single PUT operation, you can upload a single object up to 5 GB in size.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;더 큰 객체는 여러 조각으로 나눠 병렬로 올리는 멀티파트 업로드를 씁니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You can use a multipart upload for objects from 5 MB to 50 TB in size.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스 NAS에서는 파일 크기가 디스크 여유 공간의 문제였다면, S3에서는 &quot;어떤 업로드 방식을 쓸 것인가&quot;의 문제로 바뀝니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;쓰자마자 읽어도 최신 값이 보장된다 &amp;mdash; 강한 일관성&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;과거 S3는 새로 쓴 객체를 곧바로 읽으면 이전 값이 보일 수 있는 최종 일관성(eventual consistency) 모델이었지만, 지금은 다릅니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon S3 provides strong read-after-write consistency for PUT and DELETE requests of objects in your Amazon S3 bucket in all AWS Regions. This behavior applies to both writes of new objects as well as PUT requests that overwrite existing objects and DELETE requests.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;객체를 쓰고 바로 읽거나 목록을 조회해도 그 결과에 곧바로 반영된다는 뜻입니다. 다만 버킷 자체의 설정(버저닝 활성화 등)은 여전히 최종 일관성입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If you enable versioning on a bucket for the first time, it might take a short amount of time for the change to be fully propagated. We recommend that you wait for 15 minutes after enabling versioning before issuing write operations (PUT or DELETE requests) on objects in the bucket.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;기본은 비공개, 접근 차단 설정이 기본으로 켜져 있다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;버킷도 객체도 만들자마자 공개되는 일은 없습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;By default, all general purpose buckets are private.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;여기에 더해 Block Public Access(공개 접근 차단)라는 계정&amp;middot;버킷 단위 설정이 기본으로 켜져 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;By default, new buckets, access points, and objects don't allow public access.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;접근 통제는 버킷 정책과 계정 권한 관리 서비스인 IAM(Identity and Access Management)이 중심입니다. 예전에는 개별 객체&amp;middot;버킷 단위로 접근 권한을 붙이는 ACL(Access Control List &amp;mdash; 접근 통제 목록)도 쓰였지만, 지금은 새 버킷에서 기본으로 꺼져 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;By default, Object Ownership is set to the Bucket owner enforced setting, and all ACLs are disabled. When ACLs are disabled, the bucket owner owns all the objects in the bucket and manages access to them exclusively by using access-management policies.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 버킷 이름을 만들 때마다 이미 있다고 거부당한다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;신규 프로젝트의 파일 저장용 버킷을 만들려는데, 계속 &quot;이미 사용 중&quot;이라는 오류만 돌아오는 상황을 가정합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;순진한 시도&lt;/b&gt;는 회사명이나 서비스명을 붙인 짧고 예쁜 이름(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mycompany-uploads&lt;/code&gt; 같은)을 여러 방식으로 바꿔 가며 계속 시도하는 것입니다. 계정 안에서는 처음 쓰는 이름인데도 계속 실패합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;문제&lt;/b&gt;는 위에서 확인했듯 버킷 이름이 계정 단위가 아니라 &lt;b&gt;파티션 전체에서 유일해야 하는 전역 네임스페이스&lt;/b&gt;라는 데 있습니다. 다른 계정이 이미 그 이름을 선점하고 있으면, 내 계정에서 한 번도 안 써 본 이름이라도 실패합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;정답&lt;/b&gt;은 두 갈래입니다. 하나는 이름 뒤에 계정 ID와 리전 코드를 붙인 &lt;b&gt;계정 리전 네임스페이스&lt;/b&gt;를 쓰는 것입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;New general purpose buckets created in your account regional namespace are unique to your account and can never be re-created by another account.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 방식은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;{{이름 접두사}}-계정ID-리전-an&lt;/code&gt; 형태를 강제로 따라야 합니다. 다른 하나는 무작위 문자열을 뒤에 덧붙여 이름 자체를 예측 불가능하게 만드는 방법입니다. 온프레미스에서는 파일 서버 이름이 사내에서만 겹치지 않으면 됐지만, S3 버킷 이름은 전 세계 다른 회사의 계정과도 겹치지 않아야 한다는 걸 이 시나리오가 보여줍니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 온프레미스 관리자가 자주 하는 오해&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 1. &quot;네트워크 드라이브처럼 버킷을 마운트해서 쓰면 되겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;도입부 상황이 정확히 이 오해에서 시작합니다. S3에는 마운트 개념이 없습니다 &amp;mdash; 접근은 REST API 호출입니다. 다만 파일 인터페이스가 꼭 필요한 상황을 위한 별도 계층이 있습니다. 하나는 AWS Storage Gateway의 S3 File Gateway로, NFS나 SMB 파일 공유처럼 온프레미스에 노출해 줍니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;By using this combination, you can store and retrieve objects in Amazon S3 using industry-standard file protocols such as Network File System (NFS) and Server Message Block (SMB).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;다른 하나는 리눅스 전용 오픈소스 클라이언트인 Mountpoint for S3로, 버킷을 로컬 파일 시스템처럼 마운트할 수 있게 해 줍니다. 다만 이름과 달리 완전한 파일 시스템은 아닙니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Mountpoint supports basic file system operations, and can read files up to 50 TB in size. It can list and read existing files, and it can create new ones. It cannot modify existing files or delete directories, and it does not support symbolic links or file locking.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;NAS는 POSIX(Portable Operating System Interface &amp;mdash; 유닉스 계열 운영체제의 파일 접근 표준) 방식의 완전한 파일 시스템 의미론을 제공하지만, S3와 그 위에 얹는 파일 인터페이스 계층들은 처음부터 그 의미론 전체를 흉내 내도록 설계되지 않았습니다. &quot;일단 마운트해서 기존 애플리케이션을 그대로 얹는다&quot;는 접근은 되는 것 같다가도 파일 잠금이나 기존 파일 수정이 필요한 지점에서 막힙니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 2. &quot;폴더를 지우면 그 폴더 전체가 지워진다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;1장에서 확인했듯 S3에는 진짜 폴더가 없습니다. 콘솔에서 &quot;폴더를 삭제&quot;하는 동작은 실제로는 &lt;b&gt;그 접두사로 시작하는 객체들을 하나씩(또는 배치로) 삭제&lt;/b&gt;하는 것입니다. 반대로 &quot;빈 폴더&quot;를 만들었다고 생각했는데 나중에 API로 그 버킷을 조회하면, 콘솔에는 안 보이던 0바이트짜리 객체가 하나 있는 걸 발견하게 되는 경우도 있습니다. 온프레미스에서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rmdir&lt;/code&gt;로 디렉터리 자체를 지우는 감각과 달리, S3에서 지우는 대상은 처음부터 끝까지 &quot;키를 가진 객체들&quot;입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 3. &quot;저장만 해두면 어느 클래스든 여러 데이터센터에 복제돼 있다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;3장 표에서 봤듯 &lt;b&gt;모든 스토리지 클래스가 같은 조건은 아닙니다.&lt;/b&gt; S3 One Zone-IA는 이름 그대로 단일 AZ에만 저장됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;S3 One Zone-IA &amp;ndash; Amazon S3 stores the object data in only one Availability Zone, which makes it less expensive than S3 Standard-IA. However, the data is not resilient to the physical loss of the Availability Zone resulting from disasters, such as earthquakes and floods.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;내구성 숫자(11개의 9)는 One Zone-IA도 다른 클래스와 똑같습니다 &amp;mdash; 그 데이터센터 안에서는 여러 장치에 중복 저장되기 때문입니다. 하지만 &lt;b&gt;그 데이터센터 자체가 재해로 사라지면 복구할 수 없다&lt;/b&gt;는 게 가용성 숫자(99.5%)가 다른 이유입니다. 공식 문서도 이 클래스의 권장 용도를 명확히 못박습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;S3 One Zone-IA (ONEZONE_IA) &amp;ndash; Use if you can re-create the data if the Availability Zone fails, for object replicas when configuring S3 Cross-Region Replication (CRR).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;여기서 말하는 CRR(Cross-Region Replication &amp;mdash; 다른 리전으로 객체를 복제하는 기능)처럼, 원본 데이터, 다시 만들 수 없는 유일한 사본을 One Zone-IA에 두면 안 됩니다. 다시 만들 수 있는 데이터(다른 곳에 원본이 있는 복제본, 캐시 등)에만 어울리는 클래스입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 4. &quot;라이프사이클로 아무 때나 Glacier로 내리면 무조건 저렴해진다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;Standard-IA&amp;middot;One Zone-IA는 30일, Glacier Instant Retrieval은 90일, Glacier Flexible Retrieval과 Deep Archive는 90일과 180일이라는 최소 저장 기간이 있습니다. 이 기간을 못 채우고 삭제하거나 다른 클래스로 다시 옮기면 어떻게 될까요.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The S3 Standard-IA and S3 One Zone-IA storage classes are suitable for objects larger than 128 KB that you plan to store for at least 30 days. If an object is less than 128 KB, Amazon S3 charges you for 128 KB. If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;용량이 작은 객체(128KB 미만)는 실제 크기와 무관하게 128KB로 청구되고, 최소 저장 기간을 못 채우고 지우면 그 남은 기간만큼 요금이 붙습니다. 클래스를 옮기는 전환(transition) 자체에도 별도 요청 비용이 듭니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;There are costs associated with lifecycle transition requests.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;그리고 전환은 공짜로 되는 게 아니라 데이터를 다시 쓰는(ingest) 동작이라, 꺼낼 때 내는 검색 수수료와는 별개로 넣을 때 내는 비용이 붙습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;There are no data retrieval charges for lifecycle transitions. However, there are per-request ingestion charges when using PUT, COPY, or lifecycle rules to move data into any S3 storage class.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 &quot;오래된 파일은 그냥 저렴한 디스크로 옮기면 이득&quot;이었던 감각을 그대로 옮기면, 수명이 짧은 파일(로그처럼 금방 지워지는)에까지 라이프사이클을 걸었다가 최소 저장 기간 위약금성 청구와 전환 요청 비용이 겹쳐 오히려 손해를 볼 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 로그를 Glacier로 자동 전환했더니 스토리지 비용이 오히려 늘었다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;애플리케이션 로그를 매일 새 객체로 쌓아 두고, 오래된 로그는 저렴하게 보관하려는 상황을 가정합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;순진한 시도&lt;/b&gt;는 로그가 쌓이는 즉시(1일 뒤) Glacier Flexible Retrieval로 전환하는 라이프사이클 규칙을 겁니다. &quot;어차피 오래된 로그니까 최대한 빨리 싼 곳으로 옮기는 게 이득&quot;이라는 판단입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;문제&lt;/b&gt;는 이 서비스의 로그 보관 정책이 실제로는 60일 뒤 삭제라는 데 있습니다. Glacier Flexible Retrieval의 최소 저장 기간은 90일인데, 삭제는 그보다 30일 이른 60일째에 일어납니다. 위에서 확인했듯 최소 저장 기간을 못 채우고 삭제하면 그 남은 기간만큼 요금이 붙습니다. 게다가 로그 파일 다수가 128KB보다 작아, Standard에 있었다면 실제 크기대로 청구됐을 것이 Glacier로 전환되자마자 더 큰 최소 청구 용량 기준으로 다시 계산되고, 여기에 전환 자체의 요청 비용까지 매일 쌓입니다. &quot;빨리 옮길수록 이득&quot;이라는 가정과 반대로, 저장 단가는 낮아졌는데 총비용은 늘어난 상태로 나타납니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;정답&lt;/b&gt;은 라이프사이클 규칙을 세우기 전에 &lt;b&gt;그 데이터의 실제 보관 기간이 목표 클래스의 최소 저장 기간을 넘는지부터 확인&lt;/b&gt;하는 것입니다. 60일 만에 지워지는 로그라면 Glacier로 내리지 말고 Standard에 그대로 두고 60일째 만료(expiration)만 걸거나, 정말 장기 보관이 필요한 로그(예: 감사용 1년 보관분)만 따로 골라 90일 이상 지난 뒤에 전환하도록 조건을 나눠야 합니다. 접근 패턴이 불확실하다면 최소 저장 기간이 없는 S3 Intelligent-Tiering으로 옮겨 자동 최적화를 맡기는 것도 대안입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 비용&amp;middot;운영 감각&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 NAS 한 대를 들이면 디스크&amp;middot;컨트롤러&amp;middot;전력&amp;middot;공간 비용이 도입 시점에 크게 몰려 나가고, 그 뒤로는 감가상각으로 흡수됩니다. S3는 반대로 처음부터 끝까지 실제로 쓴 만큼만 청구되는 종량제입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon S3 charges you only for what you actually use, with no hidden fees and no overage charges.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;과금은 크게 몇 갈래로 나뉩니다 &amp;mdash; 저장한 용량, 요청 처리(PUT&amp;middot;GET&amp;middot;LIST 등 API 호출 횟수), 인터넷으로 나가는 데이터 전송량, 스토리지 클래스별 검색&amp;middot;복원 수수료, 그리고 라이프사이클 전환이나 Intelligent-Tiering 모니터링 같은 관리 기능 수수료입니다. &lt;b&gt;정확한 단가는 리전마다 다르고 시점에 따라 계속 바뀌므로, 이 글은 구체적인 숫자를 못박지 않습니다.&lt;/b&gt; &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;https://aws.amazon.com/s3/pricing/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Amazon S3 요금&lt;/a&gt; 페이지에서 리전을 선택해 직접 확인하는 것이 가장 정확한 방법입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;숫자를 찾아보기 전에 먼저 봐야 하는 건 &quot;어떤 항목이 애초에 청구 대상인가&quot;입니다. 4장에서 다뤘듯 스토리지 클래스를 낮은 등급으로 옮기는 전환 자체에도 요청 비용이 붙고, Standard-IA&amp;middot;Glacier 계열은 저장 단가가 싼 대신 꺼낼 때(GET) 검색 수수료가 따로 붙습니다. 온프레미스에서 &quot;일단 디스크에 넣어 두면 다시 꺼내 쓰는 건 공짜&quot;였던 감각을 그대로 옮기면, 자주 내려받는 데이터를 무작정 Glacier로 옮겼다가 검색 수수료 때문에 오히려 손해를 볼 수 있습니다. Storage Class Analysis 같은 도구로 실제 접근 패턴을 먼저 확인한 뒤 클래스를 고르는 편이, 요금표의 단가를 외우는 것보다 실무에서 더 유용합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;진짜 비용은 스토리지 클래스 선택과 라이프사이클 설계에 들이는 시간입니다.&lt;/b&gt; 저장 단가 몇 원 차이보다, 4장의 조기 전환 시나리오처럼 최소 저장 기간과 최소 청구 용량을 무시하고 라이프사이클을 설계하는 쪽이 훨씬 비싼 대가를 치르게 합니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 관련 개념&lt;/h2&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Amazon CloudFront&lt;/b&gt; &amp;mdash; S3에 저장한 정적 콘텐츠를 전 세계 엣지 위치로 캐싱해 배포하는 CDN(Content Delivery Network &amp;mdash; 콘텐츠를 사용자와 가까운 위치에서 캐싱해 전달하는 네트워크). S3가 원본(origin) 저장소, CloudFront가 배포 계층을 맡는 조합으로 자주 쓰인다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS Storage Gateway(S3 File Gateway)&lt;/b&gt; &amp;mdash; NFS&amp;middot;SMB로 S3를 파일 공유처럼 온프레미스에 노출해 주는 가상 어플라이언스(4장 오해 1).&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Mountpoint for S3&lt;/b&gt; &amp;mdash; 리눅스 전용 오픈소스 파일 클라이언트. 완전한 POSIX 파일 시스템이 아니라 기본 연산만 지원한다(4장 오해 1).&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;EBS(Elastic Block Store)&amp;middot;EFS(Elastic File System)&lt;/b&gt; &amp;mdash; 각각 블록&amp;middot;파일 스토리지로, 오브젝트 스토리지인 S3와는 계층이 다른 서비스다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;IAM&amp;middot;버킷 정책&lt;/b&gt; &amp;mdash; S3 접근 통제의 기반이 되는 계정 권한 체계(3장&amp;middot;4장).&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;7. 한눈에 정리&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;확인할 것&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;접근 방식&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;마운트 아님 &amp;mdash; REST API&amp;middot;콘솔&amp;middot;CLI, 또는 File Gateway&amp;middot;Mountpoint 같은 별도 계층이 필요&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;저장 구조&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;버킷 안 평평한 키 네임스페이스, 콘솔의 &quot;폴더&quot;는 접두사 흉내&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;버킷 이름&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;파티션 전체에서 유일해야 하고, 생성 후 이름&amp;middot;리전 변경 불가&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;스토리지 클래스&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;접근 빈도로 고른다 &amp;mdash; 내구성은 대부분 동일, 가용성&amp;middot;AZ 수는 클래스마다 다름&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;객체 크기&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;콘솔 업로드 160GB, 단일 PUT 5GB, 멀티파트 업로드 5MB~50TB&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;일관성&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;PUT&amp;middot;DELETE는 전 리전에서 강한 읽기-후-쓰기 일관성&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본 접근 권한&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비공개, Block Public Access 기본 켜짐, ACL은 기본 비활성화&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;라이프사이클&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;최소 저장 기간 전에 삭제&amp;middot;전환하면 잔여 기간만큼 비례 청구&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비용 확인&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;숫자는 요금 페이지에서, 먼저 어떤 항목(저장&amp;middot;요청&amp;middot;전송&amp;middot;검색)이 청구 대상인지부터 파악&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/EBS%C2%B7EFS-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-SAN%C2%B7NAS-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EC%8A%A4%ED%86%A0%EB%A6%AC%EC%A7%80&quot;&gt;블록 스토리지와 오브젝트 스토리지의 차이&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/IAM-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-ADLDAP-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B3%84%EC%A0%95%C2%B7%EA%B6%8C%ED%95%9C-%EA%B4%80%EB%A6%AC&quot;&gt;버킷 접근이 막혔을 때 권한부터 보는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/mount-%C2%B7-etcfstab-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%EC%84%9C%EB%B9%84%EC%8A%A4%EB%8A%94-%EC%82%B4%EC%95%84-%EC%9E%88%EB%8A%94%EB%8D%B0-%EC%95%84%EB%AC%B4%EA%B2%83%EB%8F%84-%EB%AA%BB-%EC%94%81%EB%8B%88%EB%8B%A4&quot;&gt;NAS 마운트 감각으로 접근하면 걸리는 지점&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>AWS/이게 뭐야?</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/92</guid>
      <comments>https://wowpanel.tistory.com/entry/S3-%E2%80%94-NAS-%EB%A7%88%EC%9A%B4%ED%8A%B8-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%97%B4%EB%A9%B4-%EB%B0%94%EB%A1%9C-%EA%B1%B8%EB%A6%AC%EB%8A%94-AWS%EC%9D%98-%EC%98%A4%EB%B8%8C%EC%A0%9D%ED%8A%B8-%EC%8A%A4%ED%86%A0%EB%A6%AC%EC%A7%80#entry92comment</comments>
      <pubDate>Sun, 6 Sep 2026 15:22:03 +0900</pubDate>
    </item>
    <item>
      <title>개인정보처리방침</title>
      <link>https://wowpanel.tistory.com/pages/%EA%B0%9C%EC%9D%B8%EC%A0%95%EB%B3%B4%EC%B2%98%EB%A6%AC%EB%B0%A9%EC%B9%A8</link>
      <description>&lt;h2&gt;개인정보처리방침&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;wowpanel.tistory.com&lt;/strong&gt;(이하 '블로그')을 운영하는 개인 운영자(이하 '운영자')는
이용자의 개인정보를 소중히 다루며 관련 법령을 준수합니다. 본 방침은 시행일자 기준으로 적용됩니다.&lt;/p&gt;

&lt;h2&gt;1. 수집하는 개인정보 항목 및 수집 방법&lt;/h2&gt;
&lt;p&gt;운영자는 별도의 회원가입 절차를 운영하지 않으며, 이용자가 자발적으로 입력하는 정보(방명록·댓글
작성 시 닉네임, 이메일, 비밀번호 등) 외에는 개인정보를 직접 수집하지 않습니다. 다만 블로그 이용
과정에서 아래 정보가 쿠키 등을 통해 자동으로 생성·수집될 수 있습니다.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;방문 일시, 서비스 이용 기록, 접속 로그, 쿠키, 접속 IP, 기기 정보(OS·브라우저 종류)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;2. 개인정보의 수집 및 이용 목적&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;방문자 통계 분석 및 블로그 서비스 개선 (Google Analytics 등)&lt;/li&gt;
  &lt;li&gt;이용자 맞춤형 광고 제공 (Google AdSense)&lt;/li&gt;
  &lt;li&gt;댓글·방명록 관리 및 스팸 방지&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;3. 쿠키(Cookie) 운영 및 광고 서비스 안내&lt;/h2&gt;
&lt;p&gt;본 블로그는 Google이 제공하는 애드센스(Google AdSense) 광고를 게재하고 있으며, Google을
비롯한 제3자 광고 네트워크 공급자는 쿠키를 사용해 이용자가 본 블로그 및 다른 사이트를 방문한
기록을 바탕으로 광고를 게재합니다.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;이용자는 &lt;a href=&quot;https://adssettings.google.com&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;Google 광고 설정&lt;/a&gt;에서 맞춤 광고를 비활성화할 수 있습니다.&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.aboutads.info/choices&quot; target=&quot;_blank&quot; rel=&quot;noopener noreferrer&quot;&gt;www.aboutads.info&lt;/a&gt;에서 제3자 공급업체의 맞춤 광고 쿠키 사용을 거부할 수 있습니다.&lt;/li&gt;
  &lt;li&gt;웹 브라우저 설정(예: 크롬 설정 &amp;gt; 개인정보 및 보안 &amp;gt; 쿠키)에서 쿠키 저장을 거부할 수 있으며,
  이 경우 일부 서비스 이용에 제한이 있을 수 있습니다.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;4. 개인정보의 제3자 제공 및 처리 위탁&lt;/h2&gt;
&lt;p&gt;운영자는 이용자의 개인정보를 원칙적으로 외부에 제공하지 않으며, 서비스 제공을 위해 아래와 같이
위탁하고 있습니다.&lt;/p&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;6&quot; cellspacing=&quot;0&quot;&gt;
  &lt;thead&gt;
    &lt;tr&gt;&lt;th&gt;수탁업체&lt;/th&gt;&lt;th&gt;위탁업무 내용&lt;/th&gt;&lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;&lt;td&gt;Google LLC (Google AdSense)&lt;/td&gt;&lt;td&gt;맞춤형 광고 게재&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;Google LLC (Google Analytics)&lt;/td&gt;&lt;td&gt;방문자 통계 분석&lt;/td&gt;&lt;/tr&gt;
    &lt;tr&gt;&lt;td&gt;카카오(티스토리)&lt;/td&gt;&lt;td&gt;블로그 플랫폼 운영, 방명록·댓글 기능 제공&lt;/td&gt;&lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2&gt;5. 개인정보의 보유 및 이용 기간&lt;/h2&gt;
&lt;p&gt;이용자가 남긴 댓글·방명록은 해당 게시물이 삭제되거나 이용자가 삭제를 요청할 때까지 보관되며,
쿠키를 통해 수집된 정보는 관련 서비스(Google)의 정책에 따라 처리됩니다.&lt;/p&gt;

&lt;h2&gt;6. 이용자의 권리와 행사 방법&lt;/h2&gt;
&lt;p&gt;이용자는 언제든지 본인이 작성한 댓글·방명록의 열람, 정정, 삭제를 요청할 수 있으며, 아래 연락처로
문의 시 지체 없이 조치합니다.&lt;/p&gt;

&lt;h2&gt;7. 개인정보 보호책임자&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;담당자: 블로그 운영자&lt;/li&gt;
  &lt;li&gt;이메일: wowpanel.seo@gmail.com&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;문의사항은 위 이메일로 연락 주시면 신속히 답변드리겠습니다.&lt;/p&gt;

&lt;h2&gt;8. 고지의 의무&lt;/h2&gt;
&lt;p&gt;본 개인정보처리방침은 법령·정책 변경에 따라 내용이 추가·삭제 및 수정될 수 있으며, 변경 시 본
페이지를 통해 공지합니다.&lt;/p&gt;

&lt;h2&gt;부칙&lt;/h2&gt;
&lt;p&gt;본 방침은 2026년 9월 6일부터 시행됩니다.&lt;/p&gt;</description>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/pages/%EA%B0%9C%EC%9D%B8%EC%A0%95%EB%B3%B4%EC%B2%98%EB%A6%AC%EB%B0%A9%EC%B9%A8</guid>
      <pubDate>Sun, 6 Sep 2026 09:19:01 +0900</pubDate>
    </item>
    <item>
      <title>lsof로 세면 안 보입니다 &amp;mdash; 파일 디스크립터 고갈, 장애 하루 전 신호</title>
      <link>https://wowpanel.tistory.com/entry/lsof%EB%A1%9C-%EC%84%B8%EB%A9%B4-%EC%95%88-%EB%B3%B4%EC%9E%85%EB%8B%88%EB%8B%A4-%E2%80%94-%ED%8C%8C%EC%9D%BC-%EB%94%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%84%B0-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;프로세스가 파일을 못 열기 시작하면 증상이 사방으로 튑니다. 로그를 못 쓰고, 새 커넥션을 못 받고, 심하면 &lt;b&gt;새 프로세스조차 못 띄웁니다.&lt;/b&gt; 원인은 하나 &amp;mdash; 그 프로세스가 열 수 있는 파일 디스크립터 개수 한도(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;)에 이미 닿아 있었다는 것입니다. 이 글은 그 한도에 다가가는 신호를 어떻게 확인하는지(그리고 흔히 쓰는 방법이 왜 부정확한지), 실제로 한도까지 밀어붙였을 때 무슨 일이 벌어지는지, 오늘 무엇을 조치해야 하는지를 다룹니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;금요일 저녁, 결제 API 서버&lt;/b&gt; &amp;mdash; 신규 커넥션이 간헐적으로 실패하기 시작했다. 애플리케이션 로그엔 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Too many open files&lt;/code&gt;. 담당자는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof -p &amp;lt;PID&amp;gt;&lt;/code&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;| wc -l&lt;/code&gt;로 열린 파일 수를 세어 봤다 &amp;mdash; 결과는 800. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;은 1024. &quot;아직 여유 있는데?&quot; 하고 다른 곳을 팠다. 30분 뒤에야 알았다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof&lt;/code&gt; 출력에는 실제 파일 디스크립터가 아닌 줄(현재 작업 디렉터리, 실행 파일 자체, 메모리 매핑)이 섞여 있어서, &lt;b&gt;진짜 사용량은 이미 1000을 넘어 있었다.&lt;/b&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;은 프로세스 하나가 동시에 열 수 있는 파일 디스크립터 개수의 상한입니다. 소켓, 열린 파일, 파이프 전부 이 한도 안에서 셉니다. 이 글에서는 이 한도를 정확히 세는 법, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man&lt;/code&gt; 원전으로 확인한 위험 메커니즘, 실제로 한도까지 밀어붙인 재현 결과, 그리고 오늘 조치할 것을 정리합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;측정 환경: Rocky Linux 9.7(커널 5.14.0-611.47.1.el9_7) &amp;middot; GNU bash 5.1.8 &amp;middot; util-linux 2.37.4(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;prlimit&lt;/code&gt;) &amp;middot; lsof 4.94.0 &amp;middot; systemd 252 &amp;middot; GNU coreutils 8.32(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ls&lt;/code&gt;). 이 글의 모든 명령 출력은 이 환경에서 직접 실행해 얻은 것입니다.&lt;/blockquote&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;신호 관찰 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof&lt;/code&gt;로 세면 안 되는 이유&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;왜 위험한가 &amp;mdash; 프로세스 한도와 시스템 한도는 다르다&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;재현 &amp;mdash; 한도까지 밀어붙여 봅니다&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;임계값과 오탐 &amp;mdash; 몇 %부터, 그리고 아닌 경우&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;지금 조치 &amp;mdash; 지금 늘릴 수 있는 것과 재시작이 필요한 것&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;치트시트 &amp;mdash; 정기 점검 명령&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. 신호 관찰 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof&lt;/code&gt;로 세면 안 되는 이유&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof -p &amp;lt;PID&amp;gt;&lt;/code&gt;는 그 프로세스와 관련된 모든 항목을 보여줍니다 &amp;mdash; 실제로 열린 파일 디스크립터뿐 아니라, 현재 작업 디렉터리(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;cwd&lt;/code&gt;)&amp;middot;루트(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rtd&lt;/code&gt;)&amp;middot;실행 파일 자체(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;txt&lt;/code&gt;)&amp;middot;메모리 매핑(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mem&lt;/code&gt;)까지 전부 한 줄씩 나옵니다. 이 중 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;이 세는 건 &lt;b&gt;진짜 파일 디스크립터뿐&lt;/b&gt;입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ sleep 300 &amp;amp;&lt;br /&gt;$ PID=$!&lt;br /&gt;$ ls /proc/$PID/fd | wc -l&lt;br /&gt;3&lt;br /&gt;$ lsof -p $PID | wc -l&lt;br /&gt;10&lt;br /&gt;$ lsof -p $PID | head -5&lt;br /&gt;COMMAND&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;USER&amp;nbsp;&amp;nbsp;&amp;nbsp;FD&amp;nbsp;&amp;nbsp;&amp;nbsp;TYPE DEVICE&amp;nbsp;&amp;nbsp;SIZE/OFF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NODE NAME&lt;br /&gt;sleep&amp;nbsp;&amp;nbsp;&amp;nbsp;3631002 wowpanel&amp;nbsp;&amp;nbsp;cwd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DIR&amp;nbsp;&amp;nbsp;9,124&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;4096&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;131 /home/wowpanel&lt;br /&gt;sleep&amp;nbsp;&amp;nbsp;&amp;nbsp;3631002 wowpanel&amp;nbsp;&amp;nbsp;rtd&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;DIR&amp;nbsp;&amp;nbsp;9,125&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;250&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;128 /&lt;br /&gt;sleep&amp;nbsp;&amp;nbsp;&amp;nbsp;3631002 wowpanel&amp;nbsp;&amp;nbsp;txt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;REG&amp;nbsp;&amp;nbsp;9,125&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;36312&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;357644 /usr/bin/sleep&lt;br /&gt;sleep&amp;nbsp;&amp;nbsp;&amp;nbsp;3631002 wowpanel&amp;nbsp;&amp;nbsp;mem&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;REG&amp;nbsp;&amp;nbsp;9,125 223542144&amp;nbsp;&amp;nbsp;33686081 /usr/lib/locale/locale-archive&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;방금 띄운 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sleep&lt;/code&gt;은 실제로 열어 둔 파일 디스크립터가 표준입출력 3개뿐인데(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/proc/$PID/fd&lt;/code&gt; 안 항목 수), &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof&lt;/code&gt;는 헤더 줄 포함 10줄을 보여줍니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;cwd&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rtd&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;txt&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mem&lt;/code&gt;은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;FD&lt;/code&gt; 컬럼에 숫자가 아니라 저 문자열이 찍혀서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;과 무관하다는 걸 알 수 있지만, &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof -p &amp;lt;PID&amp;gt;&lt;/code&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;| wc -l&lt;/code&gt;로 통째로 세면 이 차이가 사라집니다.&lt;/b&gt; 정확히 세려면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/proc/&amp;lt;PID&amp;gt;/fd&lt;/code&gt; 디렉터리 안의 항목 수를 직접 셉니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ls /proc/&amp;lt;PID&amp;gt;/fd | wc -l&lt;/code&gt;은 헤더 줄이 없고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;cwd&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;txt&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mem&lt;/code&gt; 같은 비-fd 항목도 안 섞입니다. 이 디렉터리 안의 각 항목이 정확히 열린 파일 디스크립터 하나입니다.&lt;/blockquote&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 왜 위험한가 &amp;mdash; 프로세스 한도와 시스템 한도는 다르다&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;파일 디스크립터 한도는 사실 두 개입니다. 이 둘을 헷갈리면 엉뚱한 곳을 고칩니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;프로세스 한도 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;RLIMIT_NOFILE&lt;/code&gt;, 넘으면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;EMFILE&lt;/code&gt;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man getrlimit&lt;/code&gt;:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;RLIMIT_NOFILE&lt;/b&gt; This specifies a value one greater than the maximum file descriptor number that can be opened by this process. Attempts (open(2), pipe(2), dup(2), etc.) to exceed this limit yield the error &lt;b&gt;EMFILE&lt;/b&gt;.&lt;/blockquote&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시스템 전체 한도 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/proc/sys/fs/file-max&lt;/code&gt;, 넘으면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ENFILE&lt;/code&gt;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man proc&lt;/code&gt;:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;/proc/sys/fs/file-max&lt;/b&gt; This file defines a system-wide limit on the number of open files for all processes. System calls that fail when encountering this limit fail with the error &lt;b&gt;ENFILE&lt;/b&gt;. (See also setrlimit(2), which can be used by a process to set the per-process limit, RLIMIT_NOFILE, on the number of files it may open.)&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;두 한도는 &lt;b&gt;에러 메시지 문구부터 다릅니다&lt;/b&gt; &amp;mdash; errno 24(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;EMFILE&lt;/code&gt;)는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Too many open files&lt;/code&gt;, errno 23(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ENFILE&lt;/code&gt;)는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Too many open files **in system**&lt;/code&gt;입니다. 1편(inode 고갈)의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;No space left on device&lt;/code&gt;는 원인이 둘(블록&amp;middot;inode)이어도 메시지가 완전히 같아서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;를 따로 찍어야 구분됐는데, 이번엔 &lt;b&gt;메시지 자체가 어느 쪽인지 알려줍니다.&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 서버의 실제 값입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ ulimit -n&lt;br /&gt;1024&lt;br /&gt;$ ulimit -Hn&lt;br /&gt;524288&lt;br /&gt;$ cat /proc/sys/fs/file-max&lt;br /&gt;9223372036854775807&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;소프트 1024&amp;middot;하드 524288은 흔히 &quot;리눅스 전통 값&quot;으로 오해하는데, 실제로는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemd&lt;/code&gt;가 로그인 세션에 주는 기본값입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;DefaultLimitNOFILE= defaults to 1024:524288.&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man systemd-system.conf&lt;/code&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;file-max&lt;/code&gt;는 사실상 무제한(64비트 정수의 최댓값)입니다 &amp;mdash; 이 서버에서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ENFILE&lt;/code&gt;은 현실적으로 거의 안 일어납니다. &lt;b&gt;운영 중에 실제로 만나는 건 거의 항상 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;EMFILE&lt;/code&gt;(프로세스 한도)입니다.&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #6b7280; background: #f9fafb !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;소켓을 대량으로 여는 프록시&amp;middot;DB&amp;middot;웹서버는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemd&lt;/code&gt;가 주는 1024로 부족해서 서비스 유닛에 별도로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;LimitNOFILE=&lt;/code&gt;을 올려 둡니다. 반대로 이 값을 아예 안 건드린 서비스가 갑자기 커넥션이 몰리면(트래픽 급증, 커넥션 정리 실패로 인한 누적) 프로세스 한도부터 부딪힙니다.&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 재현 &amp;mdash; 한도까지 밀어붙여 봅니다&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;bash -c&lt;/code&gt;로 자식 셸을 열어 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;을 낮게 잡고, 파일 디스크립터를 순서대로 열어 한도까지 채웁니다. 현재 로그인 셸의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit&lt;/code&gt;은 건드리지 않습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ bash -c '&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ulimit -S -n 20&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i=3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while :; do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if eval &quot;exec $i&amp;lt;&amp;gt;/dev/null&quot; 2&amp;gt;/dev/null; then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;n=$i; i=$((i+1))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;마지막 성공: fd $n, 실패 지점: fd $i&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fi&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;done&lt;br /&gt;&amp;nbsp;&amp;nbsp;'&lt;br /&gt;마지막 성공: fd 18, 실패 지점: fd 19&lt;br /&gt;bash: redirection error: cannot duplicate fd: Too many open files&lt;br /&gt;bash: line 5: /dev/null: Too many open files&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;(뒤 두 줄은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;2&amp;gt;/dev/null&lt;/code&gt;이 적용되기 전에 셸이 리다이렉션 실패 자체를 이미 찍은 것입니다 &amp;mdash; 1편의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;unshare&lt;/code&gt; 재현에서 본 것과 같은 현상입니다.)&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;한도 20 중 표준입출력 3개(0&amp;middot;1&amp;middot;2)를 빼면 17개를 더 열 수 있어야 할 것 같지만, 셸 자체가 내부적으로 몇 개를 더 쓰기 때문에 18에서 멈춥니다. 그리고 그다음 시도(fd 19)에서 정확히 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;EMFILE&lt;/code&gt; 메시지가 뜹니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #dc2626; background: #fef2f2 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;여유를 더 안 남기고 한도까지 꽉 채우면 훨씬 이상한 증상이 나옵니다.&lt;/b&gt; 새 프로세스를 하나 더 띄우려고 하면(예: &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sleep&lt;/code&gt;), 이렇게 실패합니다 &amp;mdash; 3회 반복해도 같은 결과입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ bash -c '&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ulimit -S -n 20&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for i in $(seq 3 20); do eval &quot;exec $i&amp;lt;&amp;gt;/dev/null&quot;; done&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sleep 5&lt;br /&gt;&amp;nbsp;&amp;nbsp;'&lt;br /&gt;bash: line 3: /dev/null: Too many open files&lt;br /&gt;sleep: error while loading shared libraries: libc.so.6: cannot open shared object file: Error 24&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;파일 디스크립터가 한도에 완전히 걸려 있으면 &lt;b&gt;동적 링크된 실행 파일은 자기 공유 라이브러리(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;libc.so.6&lt;/code&gt;)조차 열지 못해 뜨지도 못합니다.&lt;/b&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Error 24&lt;/code&gt;가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;EMFILE&lt;/code&gt;인 걸 모르면 &quot;이게 왜 라이브러리 에러야?&quot;로 완전히 엉뚱한 곳(라이브러리 경로, 패키지 손상)을 의심하게 됩니다. &lt;b&gt;fd 고갈 상태에서 실행되는 헬스체크 스크립트&amp;middot;크론 잡이 하나같이 이 메시지로 죽는다면, 원인은 그 스크립트가 아니라 이미 fd가 꽉 찬 부모/형제 프로세스 쪽입니다.&lt;/b&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 임계값과 오탐 &amp;mdash; 몇 %부터, 그리고 아닌 경우&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;절대 개수(예: &quot;800개 열림&quot;)는 의미가 없습니다. &lt;b&gt;그 프로세스의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;(소프트) 대비 비율&lt;/b&gt;로 봐야 합니다. 1편과 같은 관례(경고 80% &amp;middot; 위험 90%)를 그대로 적용할 수 있지만, fd는 원인이 명확히 갈립니다 &amp;mdash; &lt;b&gt;누수&lt;/b&gt;(연결을 정상적으로 닫지 않아 꾸준히 우상향)와 &lt;b&gt;폭주&lt;/b&gt;(트래픽 급증으로 짧은 시간에 치솟음)는 대응이 다릅니다. 어제 대비 오늘 값을 비교해서 완만한 우상향인지 급등인지부터 구분합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;오탐 주의 &amp;mdash; 이 신호인데 장애로 안 이어지는 경우&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;상황&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;왜 괜찮은가&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof -p &amp;lt;PID&amp;gt;&lt;/code&gt;로 센 값이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;에 근접&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;1장에서 본 것처럼 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;cwd&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rtd&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;txt&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mem&lt;/code&gt; 행이 섞여 과대 계산된 것 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/proc/&amp;lt;PID&amp;gt;/fd&lt;/code&gt; 개수로 다시 확인한다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;커넥션 풀을 쓰는 서비스가 항상 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;의 60~70%를 유지&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;풀 크기만큼 미리 열어 두는 설계라면 그 자체가 정상 동작 &amp;mdash; 어제 오늘 값이 그대로면(추세가 없으면) 급한 신호가 아니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;시스템 전체 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/proc/sys/fs/file-nr&lt;/code&gt;의 첫 번째 값이 큼&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;file-max&lt;/code&gt;(두&amp;middot;세 번째 값)와 비교해서 판단 &amp;mdash; 이 서버처럼 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;file-max&lt;/code&gt;가 사실상 무제한이면 이 수치 자체가 위험 신호가 아니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;프로세스 재시작 직후 fd 수가 낮았다가 서서히 정상 범위까지 오름&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;커넥션 풀&amp;middot;워커가 워밍업하며 채워지는 정상 과정 &amp;mdash; 정상 범위(운영 중 관찰한 평상시 %)를 넘어서는지가 기준이지, 0에서 오르는 것 자체는 신호가 아니다&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 지금 조치 &amp;mdash; 지금 늘릴 수 있는 것과 재시작이 필요한 것&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;원인 프로세스와 fd 목록 확인&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;ls /proc/&amp;lt;PID&amp;gt;/fd | wc -l # 정확한 현재 사용량&lt;br /&gt;grep &quot;Max open files&quot; /proc/&amp;lt;PID&amp;gt;/limits # 이 프로세스의 소프트&amp;middot;하드 한도&lt;br /&gt;for f in /proc/&amp;lt;PID&amp;gt;/fd/*; do readlink &quot;$f&quot;; done | sed 's/:\[[0-9]*\]//' | sort | uniq -c | sort -rn | head&lt;br /&gt;# 어떤 대상(소켓/파일/파이프)이 몰려 있는지&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;세 번째 명령은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/proc/&amp;lt;PID&amp;gt;/fd&lt;/code&gt;의 각 항목이 가리키는 대상(심볼릭 링크)을 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;readlink&lt;/code&gt;로 풀어서 종류별로 셉니다. (&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ls -l&lt;/code&gt;을 대신 쓰면 맨 위 &quot;합계&quot; 줄까지 집계에 섞여 값이 틀어집니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;readlink&lt;/code&gt;는 그 문제가 없습니다.) 같은 호스트로 가는 소켓이 압도적으로 많다면 커넥션을 안 닫고 쌓는 누수, 특정 파일 하나가 반복해서 열려 있다면 그 파일을 닫지 않는 코드 경로를 의심합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #16a34a; background: #f0fdf4 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;당장 할 수 있는 것&lt;/b&gt; &amp;mdash; 이미 떠 있는 프로세스라면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;prlimit&lt;/code&gt;으로 하드 한도 범위 안에서 소프트 한도를 즉시 올릴 수 있습니다(재시작 불필요). &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man prlimit&lt;/code&gt;이 이걸 명시합니다 &amp;mdash; &lt;i&gt;&quot;prlimit tries to retrieve and/or modify the limits&quot;&lt;/i&gt;, 대상은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--pid&lt;/code&gt;로 지정한 실행 중인 프로세스입니다. (이 글에서는 fd가 이미 소진된 프로세스를 상대로 실제 조정을 재현하려 했으나, 검증 환경에서 타이밍을 안정적으로 맞추지 못해 직접 재현 결과는 못 실었습니다 &amp;mdash; 원전 인용으로 대신합니다. 운영 환경에서 쓰기 전에 낮은 위험도의 대상으로 먼저 검증해 보시길 권합니다.)&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;prlimit --pid &amp;lt;PID&amp;gt; --nofile=4096: # 소프트 한도만 4096으로 올림 (콜론 뒤 생략 시 하드는 유지)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;지금 못 고치면 남겨 둘 것&lt;/b&gt; &amp;mdash; 프로세스를 재시작할 수 있다면 근본 해결은 시작 시점의 한도를 올리는 것입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemd&lt;/code&gt; 유닛이면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;LimitNOFILE=&lt;/code&gt;을 드롭인으로 추가(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl edit &amp;lt;유닛&amp;gt;&lt;/code&gt;), 로그인 세션에서 띄우는 프로세스면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/etc/security/limits.conf&lt;/code&gt;(PAM 세션 한정, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemd&lt;/code&gt;가 관리하는 서비스에는 적용 안 됨)를 확인합니다. &lt;b&gt;어느 쪽이든 재시작이 있어야 새 한도가 적용됩니다&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;prlimit&lt;/code&gt;으로 당장 급한 불을 껐어도, 재발을 막으려면 시작 설정 자체를 고쳐야 합니다.&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 치트시트 &amp;mdash; 정기 점검 명령&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;ulimit -n # 현재 셸의 소프트 한도&lt;br /&gt;cat /proc/&amp;lt;PID&amp;gt;/limits | grep &quot;Max open files&quot; # 특정 프로세스의 소프트&amp;middot;하드 한도&lt;br /&gt;ls /proc/&amp;lt;PID&amp;gt;/fd | wc -l # 정확한 현재 사용량 (lsof 아님)&lt;br /&gt;cat /proc/sys/fs/file-nr # 시스템 전체: 사용중/여유/상한&lt;br /&gt;prlimit --pid &amp;lt;PID&amp;gt; --nofile=&amp;lt;새값&amp;gt;: # 재시작 없이 소프트 한도만 즉시 상향&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;이 글이 보탠 것&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof -p &amp;lt;PID&amp;gt;&lt;/code&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;| wc -l&lt;/code&gt;이 실제 fd 사용량을 과대 계산한다는 것을 실측으로 확인하고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;EMFILE&lt;/code&gt;(프로세스 한도)과 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ENFILE&lt;/code&gt;(시스템 한도)이 서로 다른 메시지로 구분된다는 것을 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man&lt;/code&gt; 원전과 실제 errno로 검증했습니다. 그리고 fd 한도에 걸린 프로세스는 새 파일뿐 아니라 &lt;b&gt;새 프로세스의 공유 라이브러리 로딩까지 실패&lt;/b&gt;한다는, 겉보기엔 fd와 전혀 무관해 보이는 증상을 재현으로 확인했습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;1편(inode 고갈)과 이 글을 같이 보면, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof&lt;/code&gt; 같이 익숙한 명령이 각각 왜 이 두 자원에 대해 오해를 부르는지가 드러납니다 &amp;mdash; 둘 다 &quot;직관적으로 보이는 명령이 사실은 다른 걸 재고 있었다&quot;는 같은 함정입니다.&lt;/p&gt;
&lt;/div&gt;
&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/df-h%EB%8A%94-%EC%97%AC%EC%9C%A0-%EC%9E%88%EB%8A%94%EB%8D%B0-%ED%8C%8C%EC%9D%BC%EC%9D%B4-%EC%95%88-%EB%A7%8C%EB%93%A4%EC%96%B4%EC%A7%91%EB%8B%88%EB%8B%A4-%E2%80%94-inode-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8&quot;&gt;용량은 여유 있는데 파일이 안 만들어지는 경우&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/Cannot-assign-requested-address-%E2%80%94-ephemeral-%ED%8F%AC%ED%8A%B8-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8&quot;&gt;같은 방식으로 포트가 고갈되는 경우&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/ulimit-%C2%B7-nice-%EC%82%AC%EC%9A%A9%EB%B2%95-Too-many-open-files-%EC%95%9E%EC%97%90%EC%84%9C-%EB%AC%B4%EC%97%87%EB%B6%80%ED%84%B0-%EB%B3%B4%EB%82%98&quot;&gt;Too many open files 앞에서 무엇부터 보나&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>리눅스/장애  D-1일전</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/51</guid>
      <comments>https://wowpanel.tistory.com/entry/lsof%EB%A1%9C-%EC%84%B8%EB%A9%B4-%EC%95%88-%EB%B3%B4%EC%9E%85%EB%8B%88%EB%8B%A4-%E2%80%94-%ED%8C%8C%EC%9D%BC-%EB%94%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%84%B0-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8#entry51comment</comments>
      <pubDate>Sun, 6 Sep 2026 08:56:30 +0900</pubDate>
    </item>
    <item>
      <title>RDS &amp;mdash; &amp;quot;DB 서버 직접 구축&amp;quot; 감각으로 읽는 AWS의 관리형 데이터베이스</title>
      <link>https://wowpanel.tistory.com/entry/RDS-%E2%80%94-DB-%EC%84%9C%EB%B2%84-%EC%A7%81%EC%A0%91-%EA%B5%AC%EC%B6%95-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B4%80%EB%A6%AC%ED%98%95-%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 DB 서버를 하나 세우려면 물리 서버나 VM을 준비하고, OS를 깔고, MariaDB&amp;middot;MySQL&amp;middot;PostgreSQL 같은 엔진을 설치하고, 패치&amp;middot;백업 스크립트&amp;middot;장애조치 구성까지 전부 관리자가 직접 챙겨야 합니다. AWS RDS(Relational Database Service)는 이 중 상당 부분을 대신 맡아 주는 관리형 서비스입니다. 이 글은 RDS가 정확히 무엇을 대신해 주고 무엇은 여전히 내 몫으로 남는지, DB 서버를 직접 구축&amp;middot;운영해 본 사람이 RDS를 처음 만졌을 때 헷갈리는 지점을 다룹니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 MariaDB 서버를 직접 구축해 운영하던 인프라팀이 신규 서비스의 DB를 RDS로 올리는 프로젝트를 맡았다. &quot;관리형이니까 백업도 알아서 넉넉하게 챙겨 주겠지&quot;라는 생각으로 기본값 그대로 인스턴스를 하나 띄우고 서비스를 연결했다. 두 달 뒤 배포 스크립트 오류로 실수로 테이블 하나를 통째로 지우는 사고가 났는데, 열흘 전 데이터로 복구하려다 보니 자동 백업이 하루치밖에 안 남아 있었다. &quot;온프레미스에서는 cron으로 매일 자정 풀 백업을 받아 일주일치를 쌓아 뒀었는데&quot;라는 질문에서 시작한다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글은 실제 AWS 콘솔 화면이나 CLI(Command Line Interface &amp;mdash; 명령줄로 AWS를 조작하는 도구) 실행 결과를 캡처하지 않습니다 &amp;mdash; 이 프로젝트로 쓸 수 있는 AWS 계정이 없기 때문입니다. RDS의 정의와 관리 책임 분담, 이중화 배포&amp;middot;읽기 전용 복제본의 동작 방식, 자동 백업 보존 기간 기본값, 유지 관리 윈도우처럼 이 글이 다루는 사실 하나하나는 전부 AWS 공식 문서(Amazon RDS User Guide 등)를 직접 열어 원문을 대조한 것입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;RDS가 정확히 뭔가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;온프레미스 대응표&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;실무에서 반드시 알아야 하는 것&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;온프레미스 관리자가 자주 하는 오해&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;비용&amp;middot;운영 감각&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;관련 개념&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s7&quot;&gt;한눈에 정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. RDS가 정확히 뭔가&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서는 RDS를 이렇게 정의합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and scale a relational database in the AWS Cloud. It provides cost-efficient, resizable capacity for an industry-standard relational database and manages common database administration tasks.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 서버 한 대를 사면 CPU&amp;middot;메모리&amp;middot;스토리지&amp;middot;IOPS(Input/Output Operations Per Second &amp;mdash; 초당 처리 가능한 입출력 작업 수)가 전부 하나로 묶여 있고, 그 서버와 그 위의 OS&amp;middot;DB 엔진까지 전부 관리자 책임입니다. RDS는 이 책임 중 상당 부분을 AWS와 나눠 갖습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon RDS manages backups, software patching, automatic failure detection, and recovery.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;RDS DB 인스턴스는 특정 리전의 특정 AZ(Availability Zone &amp;mdash; 같은 리전 안에서 전력&amp;middot;냉각&amp;middot;네트워크가 서로 독립된 데이터센터 그룹)에 생성됩니다. 흔히 EC2(Elastic Compute Cloud &amp;mdash; AWS의 가상 서버 서비스)로 띄운 애플리케이션 서버가 VPC(Virtual Private Cloud &amp;mdash; 계정 전용으로 격리된 가상 네트워크) 안의 프라이빗 서브넷에 있는 이 DB 인스턴스에 접속하는 구성이 일반적입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;RDS가 지원하는 DB 엔진은 여섯 가지입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon RDS supports the following database engines:&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;IBM Db2, MariaDB, Microsoft SQL Server, MySQL, Oracle Database, PostgreSQL입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;MariaDB를 직접 구축해 운영해 봤다면, RDS for MariaDB는 그 엔진 자체(쿼리 문법&amp;middot;복제 방식 등)는 그대로 두고 그 아래 인프라 계층만 관리형으로 바꾼 것이라고 보면 됩니다. Amazon Aurora는 이 목록에 없는데, RDS와 나란히 붙어 다니는 이름이지만 별도 서비스이자 별도 문서로 다뤄집니다 &amp;mdash; 자세한 내용은 6장에서 다룹니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;그렇다고 모든 걸 다 대신해 주는 건 아닙니다. AWS 공식 문서는 온프레미스&amp;middot;EC2&amp;middot;RDS 세 가지 배포 방식의 관리 책임을 표로 비교합니다. 원문 표를 그대로 옮기면 다음과 같습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;기능&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;온프레미스 관리&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;EC2 관리&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;RDS 관리&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;애플리케이션 최적화&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;스케일링&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고가용성&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;데이터베이스 백업&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;데이터베이스 소프트웨어 패치&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;데이터베이스 소프트웨어 설치&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;OS 패치&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;OS 설치&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서버 유지보수&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;하드웨어 수명주기&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;전력&amp;middot;네트워크&amp;middot;냉각&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고객&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;표에서 빠진 항목이 하나 있습니다. 쿼리 성능입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon RDS is responsible for hosting the software components and infrastructure of DB instances and DB clusters. You are responsible for query tuning, which is the process of adjusting SQL queries to improve performance.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 &lt;b&gt;하드웨어&amp;middot;OS&amp;middot;DB 엔진 설치까지는 AWS가 책임지지만, 그 위에서 도는 쿼리가 느린 건 여전히 내 몫&lt;/b&gt;입니다. 온프레미스에서 DB 서버를 직접 구축할 때 하던 일 중 인프라 계층은 RDS로 넘어가지만, 스키마 설계와 쿼리 튜닝은 그대로 남는다는 뜻입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2160&quot; data-origin-height=&quot;1200&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/vNEdO/dJMcaiq3owG/4ZWE84RwwLKkTkcwOOEDQ0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/vNEdO/dJMcaiq3owG/4ZWE84RwwLKkTkcwOOEDQ0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/vNEdO/dJMcaiq3owG/4ZWE84RwwLKkTkcwOOEDQ0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FvNEdO%2FdJMcaiq3owG%2F4ZWE84RwwLKkTkcwOOEDQ0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2160&quot; height=&quot;1200&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2160&quot; data-origin-height=&quot;1200&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 온프레미스 대응표&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 물건이 아니라 &quot;가장 가까운 것&quot;입니다.&lt;/b&gt; 특히 Multi-AZ 배포와 읽기 전용 복제본은 둘 다 &quot;인스턴스를 하나 더 두는 것&quot;처럼 보이지만 목적이 다릅니다 &amp;mdash; 대응시켜 놓고 다른 점을 무시하면 3장&amp;middot;4장에서 다루는 시나리오&amp;middot;오해로 바로 이어집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;온프레미스&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;AWS RDS&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;같은 점&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;다른 점&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;물리 서버/VM + OS + DB 엔진 설치&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;DB 인스턴스&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;격리된 DB 실행 환경&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;하드웨어&amp;middot;OS&amp;middot;엔진 설치는 AWS가 대신(1장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;my.cnf / postgresql.conf&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;DB 파라미터 그룹&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;엔진 동작 값 설정&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;그룹 하나를 여러 인스턴스에 같이 물린다(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;cron + mysqldump/xtrabackup&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;자동 백업&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;정기적으로 쌓이는 백업&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본 보존 기간 1일, 명시적으로 늘려야(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고가용성 클러스터(Pacemaker 등) + 대기 서버&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Multi-AZ 배포&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;장애조치용 대기 인스턴스&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;동기 복제, 형태에 따라 읽기를 못 받을 수도(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;읽기 전용 슬레이브(비동기 복제)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;읽기 전용 복제본(Read Replica)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;읽기 부하 분산&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;오토스케일링 없음, 수동 생성(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;새벽 시간대 정기 패치 창&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;유지 관리 윈도우&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;정기 패치 시간대&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;필수 업데이트는 마감일 지나면 강제 적용(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 실무에서 반드시 알아야 하는 것&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;DB 인스턴스 클래스는 하드웨어 스펙이 아니라 계열로 고른다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;RDS도 EC2처럼 자유롭게 CPU&amp;middot;메모리를 조합하는 게 아니라, 정해진 클래스 계열 중에서 고르는 방식입니다. AWS 공식 문서가 정리한 계열은 네 가지입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;계열&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;접두어&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;범용&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;db.m*&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;메모리 최적화&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;db.z*&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;db.x*&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;db.r*&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;컴퓨팅 최적화&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;db.c*&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;버스터블 성능&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;db.t*&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;계열 뒤에 세대&amp;middot;크기가 붙습니다. 예를 들어 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;db.m7g.2xlarge&lt;/code&gt;는 7세대 범용 계열에 AWS 그래비톤3 프로세서를 쓰는 크기 2xlarge 클래스입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;db.m7g is a 7th-generation, general-purpose DB instance class type powered by AWS Graviton3 processors.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;스토리지는 세 갈래로 나뉘고, 매그네틱은 이미 끝난 선택지다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;DB 인스턴스 스토리지는 성능&amp;middot;용도가 다른 세 종류입니다. General Purpose(SSD)는 이렇게 설명됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;This cost-effective storage type is ideal for a broad range of workloads running on medium-sized DB instances. General Purpose storage is best suited for development and testing environments.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;프로비저닝 IOPS(PIOPS)는 이렇게 설명됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;This storage type is designed to meet the needs of I/O-intensive workloads, particularly database workloads, that require low I/O latency and consistent I/O throughput. Provisioned IOPS storage is best suited for production environments.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;매그네틱은 이미 끝난 선택지입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Magnetic storage is deprecated and is no longer offered for new DB instances. Starting July 1, 2026, you can no longer restore a snapshot to magnetic storage. Use General Purpose SSD or Provisioned IOPS SSD for any new storage needs.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;2026년 7월 1일부터는 매그네틱 스토리지로 스냅샷을 복원하는 것 자체가 막혔습니다 &amp;mdash; 새로 스토리지를 고를 일이 있다면 General Purpose SSD와 Provisioned IOPS 중에서 고르면 됩니다. 온프레미스에서 개발/운영 환경에 서로 다른 등급의 디스크(SATA vs SAS/NVMe)를 쓰던 감각과 비슷하게, 개발&amp;middot;테스트는 General Purpose SSD로, I/O가 몰리는 운영 환경은 Provisioned IOPS로 갈라 쓰면 됩니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;Multi-AZ는 두 가지 형태가 있고, 읽기를 받는지가 갈린다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;Multi-AZ 배포는 한 가지가 아니라 두 가지 형태로 나뉩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;When the deployment has one standby DB instance, it's called a Multi-AZ DB instance deployment. A Multi-AZ DB instance deployment has one standby DB instance that provides failover support, but doesn't serve read traffic. When the deployment has two standby DB instances, it's called a Multi-AZ DB cluster deployment. A Multi-AZ DB cluster deployment has standby DB instances that provide failover support and can also serve read traffic.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;DB 인스턴스 배포&lt;/b&gt;는 대기 인스턴스가 하나이고 동기 복제로 유지되지만, 그 대기 인스턴스는 읽기 트래픽을 아예 받지 않습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The following diagram depicts a Multi-AZ DB instance deployment, where Amazon RDS automatically provisions and maintains a synchronous standby replica in a different Availability Zone. The replica database doesn't serve read traffic.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;DB 클러스터 배포&lt;/b&gt;는 대기 인스턴스가 둘이고, 이 둘은 읽기 트래픽도 받을 수 있습니다. 온프레미스 고가용성 클러스터에서 흔히 쓰던 &quot;액티브-스탠바이&quot; 구성과 비슷한 건 앞의 DB 인스턴스 배포 쪽이고, 뒤의 DB 클러스터 배포는 그보다 한 단계 더 나아간 구성입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;읽기 전용 복제본은 비동기라 최신 값이 아닐 수 있다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;읽기 전용 복제본은 Multi-AZ의 대기 인스턴스와 달리 비동기 복제로 동작합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon RDS then uses the asynchronous replication method for the DB engine to update the read replica whenever there is a change to the primary DB instance.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;원본 DB 인스턴스가 백업&amp;middot;유지보수로 잠시 I/O를 못 받는 상황에 읽기 트래픽을 복제본으로 돌리는 용도로도 쓸 수 있지만, 공식 문서는 이 경우 값이 최신이 아닐 수 있다고 명시합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;In these cases, you can direct read traffic to your read replicas. For this use case, keep in mind that the data on the read replica might be 'stale' because the source DB instance is unavailable.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;그리고 복제본은 늘었다 줄었다 자동으로 조절되지 않습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You must manually create read replicas. RDS doesn't support autoscaling of read replicas, which is the automatic add or removing of read replicas as read demand changes.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;파라미터 그룹으로 엔진 설정을 관리한다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;my.cnf나 postgresql.conf에 직접 값을 써넣던 감각은 파라미터 그룹으로 옮겨 갑니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Database parameters specify how the database is configured. For example, database parameters can specify the amount of resources, such as memory, to allocate to a database.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;설정값 자체를 직접 관리하는 방식은 이렇습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You manage your database configuration by associating your DB instances and Multi-AZ DB clusters with parameter groups.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;설정 파일을 서버마다 따로 관리하는 대신, 그룹 하나를 만들어 여러 DB 인스턴스에 같이 물릴 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;자동 백업은 증분 스냅샷이고 기본 보존 기간은 하루뿐이다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;첫 스냅샷은 전체 백업이지만, 그다음부터는 변경분만 저장됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The first snapshot of a DB instance contains the data for the full database. Subsequent snapshots of the same database are incremental, which means that only the data that has changed after your most recent snapshot is saved.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;보존 기간은 인스턴스를 만들 때 지정하는 값인데, API(Application Programming Interface &amp;mdash; 프로그램끼리 주고받는 호출 인터페이스) 기본값이 생각보다 짧습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0&lt;/code&gt; disables automated backups.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 값의 공식 기본값은 1(하루)이고, 0부터 35 사이의 값만 허용됩니다. 그리고 이 DB 인스턴스가 읽기 전용 복제본의 원본이라면 0으로 설정할 수 없습니다 &amp;mdash; 복제본이 참조하는 원본의 백업을 아예 꺼 버릴 수는 없다는 뜻입니다. 이 값은 자세히 4장에서 다시 다룹니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 읽기 부하를 어떻게 분산할까&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;애플리케이션 서버가 늘면서 DB 인스턴스 하나가 읽기 쿼리로 버거워지는 상황을 가정합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;순진한 시도&lt;/b&gt;는 이미 켜 둔 Multi-AZ 배포의 대기 인스턴스가 평소에 놀고 있으니, 애플리케이션의 읽기 커넥션 절반을 그쪽으로 돌리면 되겠다고 판단하는 것입니다. 장애조치용으로 대기 중인 인스턴스가 있으니 활용하지 않을 이유가 없어 보입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;문제&lt;/b&gt;는 이 DB 인스턴스가 (DB 클러스터 배포가 아니라) DB 인스턴스 배포로 구성돼 있었다는 데 있습니다. 앞서 확인했듯 이 형태의 대기 인스턴스는 읽기 트래픽을 아예 받지 않으므로, 그쪽으로 읽기 커넥션을 돌리려는 시도 자체가 성립하지 않습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;정답&lt;/b&gt;은 대기 인스턴스를 읽기용으로 쓰려 하는 대신, 읽기 전용 복제본을 별도로 만들어 읽기 트래픽만 그쪽으로 보내는 것입니다. 공식 문서도 이 두 기능을 동시에 쓸 수 있다고 밝힙니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You can configure a read replica for a DB instance that also has a standby replica configured for high availability in a Multi-AZ deployment.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 &lt;b&gt;장애조치는 Multi-AZ 대기 인스턴스가, 읽기 분산은 읽기 전용 복제본이 맡는 서로 다른 역할&lt;/b&gt;입니다. 대기 인스턴스를 읽기용으로 억지로 끌어다 쓰려 하지 말고, 필요하면 읽기 전용 복제본을 새로 붙이면 됩니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 온프레미스 관리자가 자주 하는 오해&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 1. &quot;관리형이니까 백업 보존 기간도 기본으로 넉넉하게 잡혀 있겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;도입부 시나리오가 정확히 이 오해에서 시작합니다. 3장에서 확인했듯 자동 백업 보존 기간의 API 기본값은 &lt;b&gt;1일&lt;/b&gt;입니다. 온프레미스에서 cron으로 일주일치 이상을 쌓아 두던 감각으로 별생각 없이 기본값을 그대로 두면, 사고가 나고 며칠이 지난 뒤에는 되돌릴 지점 자체가 사라져 있습니다. 인스턴스를 만들 때(또는 나중에 수정할 때) 보존 기간 값을 업무에 맞게 최대 35일까지 직접 늘려야 합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 2. &quot;마이너 버전 자동 업그레이드를 꺼두면 패치가 아예 안 온다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;운영체제&amp;middot;엔진 업데이트는 선택형과 필수형으로 나뉩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;An optional update can be applied at any time. While these updates are optional, we recommend that you apply them periodically to keep your RDS fleet up to date. RDS does not apply these updates automatically.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A mandatory update is required and has an apply date. Plan to schedule your update before this apply date. After the specified apply date, Amazon RDS automatically upgrades the operating system for your DB instance to the latest version during one of your assigned maintenance windows.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;자동 마이너 버전 업그레이드 옵션을 꺼 둬도, 필수(mandatory) 업데이트는 지정된 적용 기한이 지나면 결국 강제로 적용됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If you repeatedly modify your DB instance maintenance window to avoid a pending mandatory upgrade, Amazon RDS can still apply the upgrade outside of your preferred maintenance window after the mandatory apply date has passed.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;유지 관리 윈도우를 계속 미루면 패치를 무기한 피할 수 있다고 여기기 쉽지만, 필수 업데이트에는 통하지 않습니다. 온프레미스에서 커널 보안 패치를 무한정 미루다가 감사에서 걸리는 것과 비슷한 구조이되, RDS 쪽은 사람이 안 움직이면 AWS가 대신 강제로 움직입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 3. &quot;Read Replica끼리 서로 복제를 걸어 이중화(순환 복제)할 수 있다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 마스터-마스터 구성을 해 봤다면 자연스럽게 떠오르는 발상이지만, RDS는 이걸 막아 둡니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Amazon RDS doesn't support circular replication. You can't configure a DB instance to serve as a replication source for an existing DB instance.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;다만 복제본에서 또 다른 복제본을 만드는 &lt;b&gt;일렬 체인&lt;/b&gt;은 일부 엔진에서 허용됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;For RDS for MariaDB and RDS for MySQL, and for certain versions of RDS for PostgreSQL, you can create a read replica from an existing read replica.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 A &amp;rarr; B &amp;rarr; C처럼 한 방향으로 이어지는 체인은 되지만, C가 다시 A로 복제를 걸어 원을 만드는 구성은 안 됩니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 4. &quot;읽기 전용 복제본은 원본과 스토리지 설정이 항상 똑같아야 한다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;기본값은 원본과 같은 스토리지 타입이지만, 다르게 지정할 수도 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;By default, a read replica is created with the same storage type as the source DB instance. However, you can create a read replica that has a different storage type from the source DB instance based on the options listed in the following table.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;다만 나중에 복제본 스토리지 용량을 늘리려면 최소 증가 폭 제한이 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;When you increase the allocated storage of a read replica, it must be by at least 10 percent. If you try to increase the value by less than 10 percent, you get an error.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;원본과 복제본을 무조건 똑같이 맞춰야 한다는 생각으로 접근하면 스토리지 타입을 못 바꾸는 줄 알고 지나치기 쉽지만, 실제로는 용도(예: 복제본을 리포팅 전용으로 쓰며 더 저렴한 타입으로)에 맞춰 다르게 가져갈 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 무중단인 줄 알았던 유지보수 창에 서비스가 잠깐 끊겼다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;Multi-AZ로 구성해 뒀으니 유지보수는 항상 무중단일 거라 믿고, 엔진 마이너 버전 업그레이드를 아무 유지보수 창에나 걸어 둔 상황을 가정합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;순진한 시도&lt;/b&gt;는 OS 패치 때와 똑같이, 대기 인스턴스를 먼저 패치하고 승격시키는 방식으로 짧게 끊기고 끝날 거라 예상하고 그대로 두는 것입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;문제&lt;/b&gt;는 엔진 버전 업그레이드가 OS 패치와 다른 절차를 탄다는 데 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If you upgrade the database engine for your DB instance in a Multi-AZ deployment, Amazon RDS modifies both primary and secondary DB instances at the same time. In this case, both the primary and secondary DB instances in the Multi-AZ deployment are unavailable during the upgrade. This operation causes downtime until the upgrade is complete.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;OS 패치는 대기 인스턴스를 먼저 손보고 승격하는 방식이라 페일오버 수준(1분 미만)으로 끝나지만, 엔진 버전 업그레이드는 기본&amp;middot;대기 인스턴스를 동시에 손대기 때문에 그 시간만큼 온전히 다운타임이 발생합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If there are underlying operating system patches that need to be applied, a short Multi-AZ failover is required to apply the patches to the primary DB instance. This failover typically lasts less than a minute.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;정답&lt;/b&gt;은 유지보수 계획을 세울 때 &quot;OS&amp;middot;하드웨어 패치냐, 엔진 버전 업그레이드냐&quot;를 구분하는 것입니다. 엔진 버전 업그레이드처럼 다운타임이 나는 작업은 트래픽이 가장 적은 시간대를 직접 골라 공지하고 진행해야 합니다. MySQL&amp;middot;PostgreSQL&amp;middot;MariaDB라면 다운타임을 줄이는 방법도 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If your DB instance runs RDS for MySQL, RDS for PostgreSQL, or RDS for MariaDB, you can minimize the downtime required for an upgrade by using a blue/green deployment.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;당장 다운타임을 감수할 수 없다면 블루/그린 배포로 새 버전 환경을 미리 만들어 전환하는 쪽을 검토하고, 여유가 있다면 트래픽이 가장 적은 시간대에 짧은 다운타임을 감수하는 쪽으로 정리하면 됩니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 비용&amp;middot;운영 감각&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 서버 감가상각&amp;middot;전력&amp;middot;냉각&amp;middot;공간 비용이 눈에 잘 안 보이는 방식으로 나갑니다. RDS는 이 비용을 아래 여섯 항목으로 명시적으로 청구합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;요금 항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;내용&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;DB 인스턴스 시간&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사용한 인스턴스 클래스 기준&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;스토리지&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;DB 인스턴스에 프로비저닝한 용량(GB당 월 단위)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;I/O 요청&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Aurora&amp;middot;매그네틱 스토리지의 스토리지 I/O 요청 총량&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;프로비저닝 IOPS&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;실제 소비량과 무관하게 프로비저닝한 IOPS 기준&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;백업 스토리지&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;자동 백업&amp;middot;수동 스냅샷에 쓰인 스토리지&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;데이터 전송&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;DB 인스턴스로 들어오고 나가는 인터넷 데이터 전송량&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;인스턴스 시간은 온디맨드와 예약 두 가지 방식으로 지불합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You pay for compute capacity per hour your DB instance runs. With on-demand, there are no long-term commitments.&quot;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&quot;You can reserve a DB instance for a one- or three-year term. Reserved Instances receive a significant discount compared to On-Demand Instances.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;절감 폭은 최대 69%까지입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You can save up to 69% when you use Reserved Instances over on-demand rates when used in steady state.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&quot;steady state&quot;&lt;/b&gt;, 즉 약정 기간 내내 그 인스턴스를 안정적으로 계속 쓴다는 전제가 붙습니다. 온프레미스에서 장비를 미리 구매해 두는 것과 비슷한 감각이지만, 중간에 껐다 켰다 하거나 클래스를 자주 바꾸면 이 절감률은 그대로 적용되지 않습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;프리 티어도 있습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;db.t3.micro&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;db.t4g.micro&lt;/code&gt; 클래스로 MariaDB&amp;middot;MySQL&amp;middot;PostgreSQL&amp;middot;SQL Server Express Edition을 월 750시간까지 무료로 쓸 수 있습니다. 다만 이중화까지 무료로 연습해 볼 수는 없습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You can't use the following features, resources, and actions with AWS Free Tier on Amazon RDS:&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 목록에 포함된 항목 중 하나가 다음입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Deployment options other than Single-AZ&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;Multi-AZ는 프리 티어 대상이 아닙니다&lt;/b&gt; &amp;mdash; Single-AZ로만 무료 사용이 가능합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;유지 관리 윈도우는 리전마다 정해진 8시간 블록 안에서 30분이 무작위로 배정됩니다. 서울 리전(ap-northeast-2)의 기본 시간 블록은 13:00&amp;ndash;21:00 UTC(Coordinated Universal Time &amp;mdash; 세계 표준시)로, 한국 시간(UTC+9)으로 환산하면 22:00~06:00 사이입니다 &amp;mdash; 별도로 지정하지 않아도 국내 새벽 시간대에 걸리도록 되어 있는 셈입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;진짜 비용은 인스턴스 요금표가 아니라 설계에 들이는 시간입니다.&lt;/b&gt; 백업 보존 기간을 기본값(1일)으로 방치하거나, Multi-AZ와 읽기 전용 복제본의 역할을 헷갈려 잘못된 구성으로 몇 달을 운영하는 쪽이 인스턴스 클래스를 한두 단계 잘못 고르는 것보다 훨씬 비싼 대가를 치르게 합니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 관련 개념&lt;/h2&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Amazon Aurora&lt;/b&gt; &amp;mdash; MySQL&amp;middot;PostgreSQL과 호환되는 AWS 자체 스토리지 엔진. RDS와 이름이 나란히 다니지만 별도 User Guide로 다뤄지는 별도 서비스다(1장).&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;블루/그린 배포(Blue/Green Deployments)&lt;/b&gt; &amp;mdash; 엔진 버전 업그레이드의 다운타임을 줄이기 위해 새 버전 환경을 미리 만들어 전환하는 배포 방식(4장 시나리오).&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Amazon CloudWatch&lt;/b&gt; &amp;mdash; RDS가 활성 데이터베이스마다 매 분 자동으로 지표를 보내는 모니터링 서비스. 이 지표 전송 자체는 추가 과금이 없다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;RDS Performance Insights&amp;middot;Enhanced Monitoring&lt;/b&gt; &amp;mdash; 부하가 큰 쿼리를 찾아내는 도구. 쿼리 튜닝 자체는 여전히 고객 책임이라는 것(1장)과 맞물린다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;보안 그룹&lt;/b&gt; &amp;mdash; VPC 안에서 DB 인스턴스로의 접근을 IP 대역이나 다른 리소스 단위로 통제하는 방화벽 규칙. RDS DB 인스턴스도 이 규칙 아래 있다.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;7. 한눈에 정리&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;확인할 것&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;관리 책임&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;하드웨어&amp;middot;OS&amp;middot;엔진 설치&amp;middot;패치&amp;middot;백업&amp;middot;장애조치는 AWS, 쿼리 튜닝은 여전히 내 몫&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Multi-AZ DB 인스턴스 배포&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;동기 대기 인스턴스 1개, 읽기 트래픽을 받지 않는다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Multi-AZ DB 클러스터 배포&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대기 인스턴스 2개, 읽기 트래픽을 받을 수 있다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;읽기 전용 복제본&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비동기, 수동 생성&amp;middot;오토스케일링 없음, 승격 가능, 순환 복제 불가&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;자동 백업&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;증분 스냅샷, 기본 보존 기간 1일(최대 35일) &amp;mdash; 명시적으로 늘려야 한다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;유지 관리 윈도우&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;30분, 리전별 8시간 블록에서 무작위 배정&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;필수 업데이트&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;유예해도 적용 기한이 지나면 강제 적용된다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;엔진 버전 업그레이드(Multi-AZ)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;OS 패치와 달리 기본&amp;middot;대기 인스턴스가 동시에 다운타임을 겪는다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;프리 티어&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Single-AZ만 대상, Multi-AZ는 프리 티어로 못 쓴다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;예약 인스턴스&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;1&amp;middot;3년 약정, 최대 69% 절감&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/EC2-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EC%84%9C%EB%B2%84-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B0%80%EC%83%81-%EC%84%9C%EB%B2%84&quot;&gt;DB를 직접 올릴 때와 무엇이 다른가&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/VPC-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EC%82%AC%EB%82%B4%EB%A7%9D-%EC%84%A4%EA%B3%84-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B0%80%EC%83%81-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC&quot;&gt;DB를 어느 서브넷에 둘 것인가&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/%EB%B3%B4%EC%95%88-%EA%B7%B8%EB%A3%B9-vs-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC-ACL-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EB%B0%A9%ED%99%94%EB%B2%BD-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EC%9D%B4%EC%A4%91-%EB%B0%A9%EC%96%B4%EC%84%A0&quot;&gt;DB 포트를 어디까지 열 것인가&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>AWS/이게 뭐야?</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/91</guid>
      <comments>https://wowpanel.tistory.com/entry/RDS-%E2%80%94-DB-%EC%84%9C%EB%B2%84-%EC%A7%81%EC%A0%91-%EA%B5%AC%EC%B6%95-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B4%80%EB%A6%AC%ED%98%95-%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4#entry91comment</comments>
      <pubDate>Sat, 5 Sep 2026 15:19:55 +0900</pubDate>
    </item>
    <item>
      <title>df -h는 여유 있는데 파일이 안 만들어집니다 &amp;mdash; inode 고갈, 장애 하루 전 신호</title>
      <link>https://wowpanel.tistory.com/entry/df-h%EB%8A%94-%EC%97%AC%EC%9C%A0-%EC%9E%88%EB%8A%94%EB%8D%B0-%ED%8C%8C%EC%9D%BC%EC%9D%B4-%EC%95%88-%EB%A7%8C%EB%93%A4%EC%96%B4%EC%A7%91%EB%8B%88%EB%8B%A4-%E2%80%94-inode-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;를 찍어 보면 디스크는 절반도 안 찼습니다. 그런데 애플리케이션은 로그를 못 쓰고, 세션 파일을 못 만들고, 업로드가 계속 실패합니다. 에러 메시지는 하필 디스크가 꽉 찼을 때와 &lt;b&gt;똑같은 문구&lt;/b&gt;입니다. 이 글은 이 상태가 장애 당일 갑자기 생기는 게 아니라, &lt;b&gt;하루 전부터 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt; 한 줄이면 보였던 신호&lt;/b&gt;라는 것과, 그 신호를 오늘 어떻게 확인하고 조치하는지를 다룹니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;목요일 오후, 배치 서버&lt;/b&gt; &amp;mdash; 파일 업로드 API가 간헐적으로 500을 뱉기 시작했다. 담당자가 제일 먼저 한 일은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h /&lt;/code&gt; &amp;mdash; 결과는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;62%&lt;/code&gt;. &quot;디스크는 남아 있는데 왜 안 되지?&quot; 하고 애플리케이션 로그를 보니 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;write(): No space left on device&lt;/code&gt;. 디스크 용량과 에러 메시지가 서로 모순되는 것처럼 보여서 30분을 애플리케이션 코드에서 헤맸다. 원인은 그 파티션의 &lt;b&gt;inode&lt;/b&gt;가 이미 하루 전부터 소진되고 있었다는 것 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;는 이 상태를 절대 보여주지 않는다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;와 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;는 같은 파티션을 서로 다른 자원 기준으로 봅니다. 하나가 여유 있다고 다른 하나도 여유 있는 건 아닙니다. 이 글에서는 그 구분이 왜 생기는지를 파일시스템 문서로 확인하고, 실제로 inode를 소진시켜 같은 에러 메시지를 재현해 보고, 오늘 무엇을 확인해야 하는지를 정리합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;측정 환경: Rocky Linux 9.7(커널 5.14.0-611.47.1.el9_7) &amp;middot; util-linux 2.37.4(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;unshare&lt;/code&gt;) &amp;middot; e2fsprogs 1.46.5(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mke2fs&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;resize2fs&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;dumpe2fs&lt;/code&gt;) &amp;middot; xfsprogs 6.4.0(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mkfs.xfs&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;xfs_info&lt;/code&gt;) &amp;middot; GNU coreutils 8.32(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df&lt;/code&gt;). 이 글의 모든 명령 출력은 이 환경에서 직접 실행해 얻은 것입니다.&lt;/blockquote&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;신호 관찰 &amp;mdash; 지금 뭘 보면 보이는가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;왜 위험한가 &amp;mdash; 파일시스템마다 다른 메커니즘&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;재현 &amp;mdash; 실제로 소진시켜 봅니다&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;임계값과 오탐 &amp;mdash; 몇 %부터, 그리고 아닌 경우&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;지금 조치 &amp;mdash; 원인을 찾고, 줄이고, 재발을 막습니다&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;치트시트 &amp;mdash; 정기 점검 명령&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. 신호 관찰 &amp;mdash; 지금 뭘 보면 보이는가&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;는 &lt;b&gt;블록(용량)&lt;/b&gt; 기준입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;는 &lt;b&gt;inode(파일 개수 한도)&lt;/b&gt; 기준입니다. 파일 하나를 만들려면 내용을 담을 블록도 있어야 하지만, 그 파일을 가리킬 inode도 하나 있어야 합니다. 블록은 남아도 inode가 없으면 파일을 못 만듭니다 &amp;mdash; 그 반대(inode는 남는데 블록이 없는 경우)가 훨씬 흔해서, 대부분의 운영자는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;만 보는 데 익숙합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ df -h /&lt;br /&gt;Filesystem&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Size&amp;nbsp;&amp;nbsp;Used Avail Use% Mounted on&lt;br /&gt;/dev/md125&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;25G&amp;nbsp;&amp;nbsp;5.9G&amp;nbsp;&amp;nbsp;&amp;nbsp;20G&amp;nbsp;&amp;nbsp;&amp;nbsp;24% /&lt;br /&gt;&lt;br /&gt;$ df -i /&lt;br /&gt;Filesystem&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Inodes&amp;nbsp;&amp;nbsp;IUsed&amp;nbsp;&amp;nbsp;IFree IUse% Mounted on&lt;br /&gt;/dev/md125&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;13101568 144192 12957376&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2% /&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 서버는 둘 다 여유롭습니다. 문제는 &lt;b&gt;이 두 수치가 서로 독립적으로 움직인다&lt;/b&gt;는 것 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Use%&lt;/code&gt;가 낮다고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IUse%&lt;/code&gt;도 낮다는 보장은 없습니다. 작은 파일(세션 파일, 락 파일, 캐시 파일, 빈 마커 파일)을 대량으로 만드는 워크로드에서는 &lt;b&gt;블록은 거의 안 쓰는데 inode만 빠르게 소진&lt;/b&gt;됩니다. 3장에서 이 상태를 실제로 만들어 봅니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-h&lt;/code&gt;는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;에도 그대로 적용됩니다 &amp;mdash; 위 예시를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -ih /&lt;/code&gt;로 다시 찍으면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;13101568&lt;/code&gt;이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;13M&lt;/code&gt;으로, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;144192&lt;/code&gt;가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;141K&lt;/code&gt;로 축약됩니다. 다만 파일 개수는 애초에 백만&amp;middot;천만 단위라 축약하면 임계값(예: 90%)과 비교하기 오히려 불편해서, 이 글의 나머지 예시는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-h&lt;/code&gt; 없이 원래 개수로 씁니다.&lt;/blockquote&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 왜 위험한가 &amp;mdash; 파일시스템마다 다른 메커니즘&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&quot;inode가 부족하다&quot;는 말이 모든 파일시스템에서 같은 뜻은 아닙니다. 흔히 쓰는 세 가지를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man&lt;/code&gt; 원전으로 확인합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;ext4 &amp;middot; tmpfs &amp;mdash; 만들 때 개수가 고정된다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mke2fs&lt;/code&gt;(ext2/3/4)는 파일시스템을 만드는 시점에 inode 개수를 정해서 굽습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man mkfs.ext4&lt;/code&gt;:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;-i bytes-per-inode&lt;/b&gt;&lt;br /&gt;Specify the bytes/inode ratio. mke2fs creates an inode for every bytes-per-inode bytes of space on the disk. The larger the bytes-per-inode ratio, the fewer inodes will be created.&lt;br /&gt;&lt;b&gt;-N number-of-inodes&lt;/b&gt;&lt;br /&gt;Overrides the default calculation of the number of inodes that should be reserved for the file system (which is based on the number of blocks and the bytes-per-inode ratio).&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmpfs&lt;/code&gt;(메모리 기반, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/tmp&lt;/code&gt;&amp;middot;컨테이너 레이어에 흔함)도 같은 방식입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmpfs&lt;/code&gt;:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;nr_inodes=inodes&lt;/b&gt;&lt;br /&gt;The maximum number of inodes for this instance. The default is half of the number of your physical RAM pages, or (on a machine with highmem) the number of lowmem RAM pages, whichever is smaller.&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;두 경우 다 &lt;b&gt;파일 크기와 무관하게 개수 자체에 상한&lt;/b&gt;이 있습니다. 0바이트짜리 파일 100만 개도 각자 inode 하나씩을 씁니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;XFS &amp;mdash; 동적이지만 상한이 있다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;Rocky/RHEL 계열 기본 파일시스템인 XFS는 필요할 때 inode를 동적으로 더 할당합니다 &amp;mdash; ext4처럼 미리 정해두지 않습니다. 대신 &lt;b&gt;전체 용량 대비 inode에 쓸 수 있는 비율 상한&lt;/b&gt;(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;imaxpct&lt;/code&gt;)이 있습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man mkfs.xfs&lt;/code&gt;:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;maxpct=value&lt;/b&gt;&lt;br /&gt;This specifies the maximum percentage of space in the filesystem that can be allocated to inodes. The default value is 25% for filesystems under 1TB, 5% for filesystems under 50TB and 1% for filesystems over 50TB.&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;실제 검증 서버 루트 파티션 값입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ xfs_info / | head -6&lt;br /&gt;meta-data=/dev/md125&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;isize=512&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;agcount=4, agsize=1637696 blks&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sectsz=512&amp;nbsp;&amp;nbsp;&amp;nbsp;attr=2, projid32bit=1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;crc=1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;finobt=1, sparse=1, rmapbt=0&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;reflink=1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bigtime=1 inobtcount=1 nrext64=0&lt;br /&gt;data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;bsize=4096&amp;nbsp;&amp;nbsp;&amp;nbsp;blocks=6550784, imaxpct=25&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;imaxpct=25&lt;/code&gt; &amp;mdash; 이 파티션 용량의 25%를 넘겨서까지 inode를 늘리지는 않는다는 뜻입니다. 메커니즘은 다르지만 결론은 같습니다 &amp;mdash; &lt;b&gt;ext4&amp;middot;tmpfs는 처음부터 막혀 있고, XFS는 늦게 막히지만 결국 막힙니다.&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #6b7280; background: #f9fafb !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;XFS에서 inode가 소진되는 상황은 ext4보다 흔치 않습니다. 아주 작은 파일(수 바이트) 수백만 개가 쌓이는 워크로드(세션 스토리지, 메일 큐, 캐시)가 아니면 25% 상한에 먼저 닿기 전에 데이터 용량이 먼저 찹니다. 반대로 ext4&amp;middot;tmpfs는 파일 크기와 무관하게 &lt;b&gt;개수만으로&lt;/b&gt; 먼저 막힐 수 있어 더 자주 봅니다.&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 재현 &amp;mdash; 실제로 소진시켜 봅니다&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;운영 파티션에서 재현할 수는 없으니, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;unshare -rm&lt;/code&gt;으로 새 마운트 네임스페이스를 열고 그 안에서만 존재하는 작은 tmpfs를 inode 100개짜리로 만듭니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sudo&lt;/code&gt; 없이, 호스트에는 아무 흔적도 안 남고, 셸이 끝나면 사라집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ LANG=C unshare -rm bash -c '&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mount -t tmpfs -o size=16m,nr_inodes=100 tmpfs /tmp/inode-lab&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;cd /tmp/inode-lab&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for i in $(seq 1 200); do : &amp;gt; file$i 2&amp;gt;/dev/null || { echo &quot;마지막 성공: file$((i-1))&quot;; break; }; done&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;df -h .&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;df -i .&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;touch onemore&lt;br /&gt;&amp;nbsp;&amp;nbsp;'&lt;br /&gt;마지막 성공: file90&lt;br /&gt;bash: line 4: file91: No space left on device&lt;br /&gt;Filesystem&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Size&amp;nbsp;&amp;nbsp;Used Avail Use% Mounted on&lt;br /&gt;tmpfs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;16M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;16M&amp;nbsp;&amp;nbsp;&amp;nbsp;0% /tmp/inode-lab&lt;br /&gt;Filesystem&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Inodes IUsed IFree IUse% Mounted on&lt;br /&gt;tmpfs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;100&amp;nbsp;&amp;nbsp;&amp;nbsp;100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;100% /tmp/inode-lab&lt;br /&gt;touch: cannot touch 'onemore': No space left on device&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;file91&lt;/code&gt; 실패 메시지가 한 번 노출되는 것은 정상입니다 &amp;mdash; 그 리다이렉션이 열리는 시점의 오류라 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;2&amp;gt;/dev/null&lt;/code&gt;이 적용되기 전에 셸이 먼저 찍습니다. 루프는 그 즉시 멈춥니다.)&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;는 여전히 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0% Use&lt;/code&gt;(16M 전부 여유)입니다. 0바이트 파일들이라 블록을 거의 안 썼기 때문입니다. 그런데 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;100% IUse&lt;/code&gt;고, 91번째 파일부터는 전부 실패했습니다. 그리고 이 에러 메시지 &amp;mdash; &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;No space left on device&lt;/code&gt;&lt;/b&gt; &amp;mdash; 는 진짜로 디스크가 꽉 찼을 때 나오는 메시지와 &lt;b&gt;완전히 동일&lt;/b&gt;합니다. 커널이 반환하는 errno가 둘 다 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ENOSPC&lt;/code&gt;라서 그렇습니다. 메시지만 봐서는 절대 구분이 안 되고, &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;를 직접 찍어야만 구분됩니다.&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #dc2626; background: #fef2f2 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;장애 중에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;No space left on device&lt;/code&gt;를 보면 반사적으로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;부터 찍습니다. 그게 여유 있다고 &quot;디스크 문제는 아니네&quot; 하고 넘어가면, 진짜 원인(inode)을 놓칩니다. &lt;b&gt;이 메시지를 보면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;와 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;를 항상 같이 찍습니다.&lt;/b&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 임계값과 오탐 &amp;mdash; 몇 %부터, 그리고 아닌 경우&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;정해진 표준값은 없지만, 디스크 용량 점검에 쓰는 관례(경고 80% &amp;middot; 위험 90%)를 inode에도 그대로 적용하는 운영팀이 많습니다. 근거는 단순합니다 &amp;mdash; inode도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IUse%&lt;/code&gt;가 100%에 닿는 순간 그 이후 동작(둘 다 &quot;새 파일을 못 만든다&quot;)이 똑같기 때문입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;그런데 &lt;b&gt;inode는 절대값보다 증가율이 더 중요&lt;/b&gt;합니다. 디스크 용량은 보통 로그처럼 완만하게 늡니다. inode는 세션 폭주&amp;middot;재시도 루프처럼 &lt;b&gt;짧은 시간에 수만 개&lt;/b&gt;가 만들어지는 워크로드에서 소진되는 경우가 많아서, 어제 2%였던 게 오늘 갑자기 90%일 수 있습니다. 하루 한 번 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;를 찍는 것보다, &lt;b&gt;전날 값과 비교하는 것&lt;/b&gt;이 실질적인 조기 경보입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;오탐 주의 &amp;mdash; 이 신호인데 장애로 안 이어지는 경우&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;상황&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;왜 괜찮은가&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;XFS에서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IUse%&lt;/code&gt;가 서서히 오르지만 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;imaxpct&lt;/code&gt;(기본 25%)에 한참 못 미침&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;동적 할당이라 필요한 만큼만 늘어난 것 &amp;mdash; ext4의 &quot;고정 상한 근접&quot;과 성격이 다르다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;xfs_info&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;imaxpct&lt;/code&gt;와 비교해서 판단한다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대량의 하드링크&amp;middot;심볼릭 링크로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IUsed&lt;/code&gt;가 높아 보임&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;링크는 새 inode를 만드는 경우와 안 만드는 경우가 갈린다(하드링크는 기존 inode 재사용, 심볼릭 링크는 새 inode 소비) &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IUsed&lt;/code&gt; 증가가 실제 파일 증가와 항상 비례하진 않는다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;컨테이너 이미지 레이어가 많아 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IUsed&lt;/code&gt;가 큼&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;레이어 자체는 정적 &amp;mdash; 지속적으로 새 파일을 만드는 워크로드와 달리 더 늘지 않는다면 급한 신호가 아니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;tmpfs &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nr_inodes&lt;/code&gt;를 마운트 옵션으로 넉넉히 잡아둔 경우&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본값(RAM 페이지의 절반)보다 낮춰 잡은 게 아니라면 일반적인 사용량으로는 잘 안 닿는다&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 지금 조치 &amp;mdash; 원인을 찾고, 줄이고, 재발을 막습니다&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;어디에 몰려 있는지 찾기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;du&lt;/code&gt;는 용량 기준이라 inode 개수를 안 보여줍니다. 디렉터리별로 파일 개수를 직접 세야 합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ for d in /tmp/inode-lab/*/; do&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo &quot;$(find &quot;$d&quot; | wc -l) $d&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;done | sort -rn&lt;br /&gt;201 /tmp/inode-lab/appA/&lt;br /&gt;6 /tmp/inode-lab/appB/&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;숫자가 압도적으로 큰 디렉터리가 원인입니다. 실무에서는 세션 저장 디렉터리(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/var/lib/php/session&lt;/code&gt; 류), 메일 큐, 애플리케이션이 정리를 안 하는 임시 디렉터리, 로그 회전이 실패해 잘게 쌓인 조각 파일이 흔한 범인입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #16a34a; background: #f0fdf4 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;당장 할 수 있는 것&lt;/b&gt; &amp;mdash; 원인 디렉터리를 찾았으면 오래된 파일부터 지웁니다(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;find 디렉터리 -type f -mtime +N -delete&lt;/code&gt;, 지우기 전에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-mtime +N&lt;/code&gt; 조건까지만 걸어서 몇 개가 걸리는지 먼저 세어 봅니다). 지우는 순간 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -i&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IFree&lt;/code&gt;가 그만큼 바로 돌아옵니다 &amp;mdash; 블록과 달리 반영이 즉시입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;지금 못 고치면 남겨 둘 것&lt;/b&gt; &amp;mdash; 원인 프로세스를 당장 못 건드리는 상황(운영 중인 세션 스토어 등)이면, 최소한 알림 임계값을 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IUse%&lt;/code&gt; 기준으로 하나 걸어 두고 넘깁니다. &quot;블록 용량은 감시하고 있었다&quot;는 다음 장애의 변명이 안 됩니다.&lt;/p&gt;
&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;growfs로 해결되지 않는 경우&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;디스크(파티션) 자체를 키우면서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;resize2fs&lt;/code&gt;로 확장하면 inode도 늘어납니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man mkfs.ext4&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-i&lt;/code&gt; 항목이 이미 못 박아 두고 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;Be warned that it is not possible to change this ratio on a file system after it is created, so be careful deciding the correct value for this parameter. &lt;b&gt;Note that resizing a file system changes the number of inodes to maintain this ratio.&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;실제로 검증 서버에서 64M&amp;rarr;256M(4배)로 키웠더니 inode도 16384개&amp;rarr;65536개(정확히 4배)로 늘었습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ dumpe2fs -h fstest.img | grep -E &quot;^Inode count|^Block count&quot; # 64M, 확장 전&lt;br /&gt;Inode count:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;16384&lt;br /&gt;Block count:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;65536&lt;br /&gt;$ resize2fs fstest.img # 256M로 truncate 후&lt;br /&gt;$ dumpe2fs -h fstest.img | grep -E &quot;^Inode count|^Block count&quot; # 확장 후&lt;br /&gt;Inode count:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;65536&lt;br /&gt;Block count:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;262144&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;grep -i &quot;inode count\|block count&quot;&lt;/code&gt;처럼 느슨하게 잡으면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Reserved block count&lt;/code&gt; 줄까지 같이 걸립니다 &amp;mdash; 줄 시작(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;^&lt;/code&gt;)을 고정해야 정확히 두 줄만 남습니다.)&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;문제는 &lt;b&gt;디스크 용량 자체를 늘릴 수 없을 때&lt;/b&gt;입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;resize2fs&lt;/code&gt;에는 inode 개수만 별도로 늘리는 옵션이 없습니다(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-N&lt;/code&gt;은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mke2fs&lt;/code&gt;에만 있습니다) &amp;mdash; 같은 크기에서 inode만 더 확보하려면 &lt;b&gt;백업 &amp;rarr; 재&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mkfs&lt;/code&gt;(다른 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-i&lt;/code&gt;/&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-N&lt;/code&gt; 값으로) &amp;rarr; 복원&lt;/b&gt;뿐입니다. 원인 파일 정리로 당장 급한 불을 끄고, 재발이 예상되면 이 재구성을 계획에 넣어야 합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;XFS는 이 지점에서 ext4&amp;middot;tmpfs보다 옵션이 하나 더 있습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man xfs_growfs&lt;/code&gt;:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;-m&lt;/b&gt; Specify a new value for the maximum percentage of space in the filesystem that can be allocated as inodes. In mkfs.xfs(8) this is specified with -i maxpct=nn.&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 용량을 안 늘려도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;imaxpct&lt;/code&gt; 상한 자체를 마운트된 상태에서 올릴 수 있습니다(이 글에서 직접 재현하지는 않았습니다 &amp;mdash; 운영 서버에서 루프 마운트에 필요한 권한이 없어 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man&lt;/code&gt; 원전 확인으로 대신합니다). ext4&amp;middot;tmpfs는 이 여지가 아예 없다는 점이 2장에서 본 &quot;처음부터 막힘 vs 늦게 막힘&quot; 차이가 조치 단계까지 그대로 이어지는 지점입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 치트시트 &amp;mdash; 정기 점검 명령&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;df -hT # 파티션별 용량&lt;br /&gt;df -iT # 파티션별 inode &amp;mdash; 위와 반드시 같이 본다&lt;br /&gt;xfs_info &amp;lt;마운트포인트&amp;gt; | grep imaxpct # XFS라면 상한을 확인&lt;br /&gt;for d in &amp;lt;상위디렉터리&amp;gt;/*/; do echo &quot;$(find &quot;$d&quot; | wc -l) $d&quot;; done | sort -rn | head&lt;br /&gt;# 어느 디렉터리가 파일 개수를 잡아먹는지&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;이 글이 보탠 것&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;df -h&lt;/code&gt;가 여유로워도 안심할 수 없는 이유를 파일시스템 문서(ext4&amp;middot;tmpfs&amp;middot;XFS)로 확인하고, 실제로 inode를 소진시켜 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;No space left on device&lt;/code&gt;가 디스크 풀과 똑같이 뜬다는 것, 그리고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;resize2fs&lt;/code&gt;가 확장 시에는 inode도 비례해서 늘리지만 &lt;b&gt;용량을 안 늘리면 inode만 따로는 못 늘린다&lt;/b&gt;는 것을 실측으로 확인했습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;다음 글은 같은 관점으로 &lt;b&gt;파일 디스크립터&lt;/b&gt;를 봅니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lsof&lt;/code&gt; 카운트가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ulimit -n&lt;/code&gt;에 조용히 다가가는 신호입니다.&lt;/p&gt;
&lt;/div&gt;

&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/lsof%EB%A1%9C-%EC%84%B8%EB%A9%B4-%EC%95%88-%EB%B3%B4%EC%9E%85%EB%8B%88%EB%8B%A4-%E2%80%94-%ED%8C%8C%EC%9D%BC-%EB%94%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%84%B0-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8&quot;&gt;같은 방식으로 파일 디스크립터가 고갈되는 경우&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/Cannot-assign-requested-address-%E2%80%94-ephemeral-%ED%8F%AC%ED%8A%B8-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8&quot;&gt;같은 방식으로 포트가 고갈되는 경우&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/df-%C2%B7-du-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EB%A1%9C%EA%B7%B8%EB%A5%BC-%EC%A7%80%EC%9B%A0%EB%8A%94%EB%8D%B0-%EC%9A%A9%EB%9F%89%EC%9D%B4-%EC%95%88-%EC%A4%84%EC%96%B4%EB%93%AD%EB%8B%88%EB%8B%A4&quot;&gt;용량과 inode를 함께 읽는 법&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>리눅스/장애  D-1일전</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/50</guid>
      <comments>https://wowpanel.tistory.com/entry/df-h%EB%8A%94-%EC%97%AC%EC%9C%A0-%EC%9E%88%EB%8A%94%EB%8D%B0-%ED%8C%8C%EC%9D%BC%EC%9D%B4-%EC%95%88-%EB%A7%8C%EB%93%A4%EC%96%B4%EC%A7%91%EB%8B%88%EB%8B%A4-%E2%80%94-inode-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8#entry50comment</comments>
      <pubDate>Sat, 5 Sep 2026 07:54:48 +0900</pubDate>
    </item>
    <item>
      <title>IAM &amp;mdash; 온프레미스 AD/LDAP 감각으로 읽는 AWS의 계정&amp;middot;권한 관리</title>
      <link>https://wowpanel.tistory.com/entry/IAM-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-ADLDAP-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B3%84%EC%A0%95%C2%B7%EA%B6%8C%ED%95%9C-%EA%B4%80%EB%A6%AC</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 &lt;b&gt;AD(Active Directory)&lt;/b&gt;나 &lt;b&gt;LDAP(Lightweight Directory Access Protocol &amp;mdash; 디렉터리 서버에 계정 정보를 조회&amp;middot;인증하는 표준 프로토콜)&lt;/b&gt; 서버 하나가 &quot;누가 로그인했는지&quot;와 &quot;그 계정이 뭘 할 수 있는지&quot;를 동시에 관리합니다. AWS에서는 이 역할을 &lt;b&gt;IAM(Identity and Access Management)&lt;/b&gt; 이 맡습니다. 다만 AD처럼 서버 한 대를 구축&amp;middot;운영하는 게 아니라, 계정을 만드는 순간부터 이미 존재하는 관리형 서비스라는 점이 다릅니다. 이 글은 IAM이 정확히 무엇이고, AD&amp;middot;LDAP를 다뤄 본 사람이 이걸 처음 만졌을 때 어디서 헷갈리는지를 다룹니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 AD 관리자로 일하던 사람이 새 AWS 계정의 권한 관리를 맡았다. 팀원이 늘 때마다 기존 개발자 계정을 복사해서 새 IAM 사용자를 만들었고, 매일 도는 배치 스크립트에는 &quot;일단 되게 하려고&quot; 액세스 키를 코드에 그대로 박아 넣었다. 몇 달 뒤 그 코드가 실수로 깃허브 공개 저장소에 올라갔고, 그 액세스 키로 낯선 리전에 인스턴스가 대량으로 뜨는 사고가 났다. &quot;AD에서는 계정 하나 새로 파는 게 이렇게 위험하지 않았는데&quot;라는 질문에서 시작한다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글은 실제 AWS 콘솔 화면이나 CLI(Command Line Interface &amp;mdash; 명령줄로 AWS를 조작하는 도구) 실행 결과를 캡처하지 않습니다 &amp;mdash; 이 프로젝트로 쓸 수 있는 AWS 계정이 없기 때문입니다. IAM 사용자&amp;middot;그룹&amp;middot;역할의 정의, 정책 평가 로직, 루트 사용자 권장 사항, 계정 할당량처럼 이 글이 다루는 사실 하나하나는 전부 AWS 공식 문서(IAM User Guide 등)를 직접 열어 원문을 대조한 것입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;IAM이 정확히 뭔가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;온프레미스 대응표&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;실무에서 반드시 알아야 하는 것&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;온프레미스 관리자가 자주 하는 오해&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;비용&amp;middot;운영 감각&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;관련 개념&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s7&quot;&gt;한눈에 정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. IAM이 정확히 뭔가&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서는 IAM을 이렇게 정의합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;AWS Identity and Access Management (IAM) is a web service that helps you securely control access to AWS resources. With IAM, you can manage permissions that control which AWS resources users can access. You use IAM to control who is authenticated (signed in) and authorized (has permissions) to use resources.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;핵심은 &lt;b&gt;인증(authentication &amp;mdash; 누구인지 확인)&lt;/b&gt; 과 &lt;b&gt;인가(authorization &amp;mdash; 그 신원이 뭘 할 수 있는지 결정)&lt;/b&gt; 를 나눠서 본다는 점입니다. AD에서 로그온(인증)과 &lt;b&gt;GPO(Group Policy Object &amp;mdash; 그룹 단위로 정책을 배포하는 AD 기능)&lt;/b&gt;&amp;middot;&lt;b&gt;ACL(Access Control List, 접근 제어 목록)&lt;/b&gt; (인가)이 별개 메커니즘이던 것과 같은 구조입니다. 다만 IAM은 이 둘을 하나의 서비스 안에서 함께 다룹니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 계정을 처음 만들면, 이미 계정 전체에 대한 전권을 가진 단일 신원이 하나 존재합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;When you first create an Amazon Web Services (AWS) account, you begin with a single sign-in identity that has complete access to all AWS services and resources in the account. This identity is called the AWS account root user.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이게 &lt;b&gt;루트 사용자&lt;/b&gt;입니다. AD의 최상위 도메인 관리자 계정과 비슷해 보이지만, 다루는 방식은 다릅니다 &amp;mdash; 자세한 내용은 4장에서 다룹니다. 루트 사용자 외의 나머지 신원(관리자&amp;middot;개발자&amp;middot;애플리케이션)은 전부 IAM으로 직접 만들어야 합니다. AD처럼 이미 도메인 컨트롤러가 계정 저장소 역할을 하고 있는 게 아니라, 계정 자체를 IAM 위에 새로 쌓아 올리는 셈입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2160&quot; data-origin-height=&quot;1200&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/dwAVZp/dJMcacLhFY0/RmNByhpLfdGYTo3NFGmZv1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/dwAVZp/dJMcacLhFY0/RmNByhpLfdGYTo3NFGmZv1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dwAVZp/dJMcacLhFY0/RmNByhpLfdGYTo3NFGmZv1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdwAVZp%2FdJMcacLhFY0%2FRmNByhpLfdGYTo3NFGmZv1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2160&quot; height=&quot;1200&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2160&quot; data-origin-height=&quot;1200&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 온프레미스 대응표&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 물건이 아니라 &quot;가장 가까운 것&quot;입니다.&lt;/b&gt; 특히 IAM 사용자&amp;middot;그룹은 AD 계정&amp;middot;그룹과 이름은 비슷해도 권장되는 쓰임새가 다릅니다 &amp;mdash; 대응시켜 놓고 다른 점을 무시하면 4장에서 다루는 오해로 바로 이어집니다. 표의 마지막 두 행에 나오는 &lt;b&gt;ADFS(Active Directory Federation Services &amp;mdash; AD 계정으로 외부 서비스에 로그인하게 해주는 페더레이션 서버)&lt;/b&gt; 와 &lt;b&gt;AWS SSO(Single Sign-On, 2022년 IAM Identity Center로 이름이 바뀐 서비스)&lt;/b&gt; 를 여기서 먼저 풀어 둡니다. IAM Identity Center가 연동하는 &lt;b&gt;IdP(Identity Provider &amp;mdash; 사용자 인증을 대신 처리해 주는 외부 신원 공급자)&lt;/b&gt; 라는 용어도 표에 함께 나오고, IAM 정책은 &lt;b&gt;JSON(JavaScript Object Notation &amp;mdash; 키&amp;middot;값 구조로 데이터를 표현하는 텍스트 형식)&lt;/b&gt; 문서로 작성됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;온프레미스 AD/LDAP&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;AWS IAM&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;같은 점&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;다른 점&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;도메인 계정&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IAM 사용자&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;개별 자격증명&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사람 계정엔 페더레이션 권장(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹(AD 그룹)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IAM 그룹&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;계정을 묶어 관리&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;리소스 접근 주체 아님, 중첩 불가(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서비스 계정&amp;middot;위임 토큰&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IAM 역할&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서비스가 대신 쓰는 자격증명&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;항상 임시, 장기 암호&amp;middot;키 없음(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;GPO&amp;middot;ACL&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IAM 정책(JSON)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;권한 규칙 정의&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;명시적 거부가 항상 우선(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;도메인 관리자 계정&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;루트 사용자&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;계정 최고 권한&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;일상 사용 금지, 특정 작업 전용(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ADFS&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IAM Identity Center&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;외부 IdP 연동 통합 인증&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;여러 AWS 계정 접근을 한 곳에서(6장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AD 서버 자체 이전&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS Directory Service&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;실제 AD를 관리형으로 운영&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IAM과 별개 서비스(6장)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 실무에서 반드시 알아야 하는 것&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;새로 만든 사용자&amp;middot;역할은 기본적으로 아무 권한이 없다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서는 이렇게 명시합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;By default, a new IAM user has no permissions to do anything. They are not authorized to perform any AWS operations or to access any AWS resources.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AD 계정을 만들면 최소한 도메인에 로그인은 되는 것과 달리, 갓 만든 IAM 사용자&amp;middot;역할은 정책을 붙여 주기 전까지 콘솔에 로그인해도 아무것도 할 수 없습니다. 권한을 시작할 때는 AWS가 미리 만들어 둔 관리형 정책(AWS managed policy)을 붙이는 게 빠르지만, 공식 문서는 이렇게 경고합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Keep in mind that AWS managed policies might not grant least-privilege permissions for your specific use cases because they are available for use by all AWS customers. As a result, we recommend that you reduce permissions further by defining customer managed policies that are specific to your use cases.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;여러 고객이 공통으로 쓰는 정책이라 필요 이상으로 넓은 경우가 흔합니다 &amp;mdash; 시작은 관리형 정책으로 하되, 실제 사용 패턴이 파악되면 그 계정 전용 정책(customer managed policy)으로 좁혀 가는 것이 &lt;b&gt;최소 권한 원칙(least privilege)&lt;/b&gt; 입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;정책 평가는 기본적으로 전부 거부, 명시적 거부가 항상 이긴다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;정책을 여러 개(identity-based, resource-based 등) 동시에 걸었을 때 AWS가 판단하는 순서는 이렇습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;AWS first checks all policies for a Deny. If one exists, then the request is denied. Then AWS checks for each Allow. If at least one policy statement allows the action in the request, the request is allowed.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 &lt;b&gt;기본값은 거부(default deny)&lt;/b&gt; 이고, 어딘가에 허용(Allow) 문이 있어야 통과합니다. 그리고 &lt;b&gt;어느 정책에든 명시적 거부(explicit Deny)가 하나라도 있으면, 다른 곳의 허용을 전부 무시하고 거부가 이깁니다.&lt;/b&gt; GPO에서 &quot;거부&quot;가 &quot;허용&quot;보다 우선하는 것과 같은 방향의 규칙이지만, IAM에서는 이게 모든 정책 종류(identity-based&amp;middot;resource-based&amp;middot;권한 경계 등)에 걸쳐 예외 없이 적용된다는 점이 다릅니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;identity-based 정책과 resource-based 정책은 같은 계정 안에서 합집합으로 평가된다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;IAM 정책은 붙는 위치에 따라 두 종류로 나뉩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Identity-based policies are attached to an IAM user, group, or role... Resource-based policies are attached to a resource. For example, you can attach resource-based policies to Amazon S3 buckets...&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;같은 계정 안에서는 이 둘이 &lt;b&gt;합집합&lt;/b&gt;으로 평가됩니다 &amp;mdash; 사용자 쪽 정책이 허용하지 않아도 리소스 쪽 정책이 허용하면 접근됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If an action is allowed by an identity-based policy, a resource-based policy, or both, then AWS allows the action. An explicit deny in either of these policies overrides the allow.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;다만 이 규칙은 &lt;b&gt;같은 계정 안에서 요청할 때만&lt;/b&gt; 성립합니다. 다른 계정에서 오는 요청은 요청자 쪽 identity-based 정책과 리소스 쪽 resource-based 정책 &lt;b&gt;양쪽 모두&lt;/b&gt;가 허용해야 통과합니다 &amp;mdash; 한쪽만 허용하면 실패합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;역할은 항상 임시 자격증명이다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;IAM 역할은 사용자와 겉모습은 비슷하지만 근본적으로 다릅니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Also, a role does not have standard long-term credentials such as a password or access keys associated with it. Instead, when you assume a role, it provides you with temporary security credentials for your role session.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;역할을 assume(맡는다)할 때마다 AWS STS(Security Token Service &amp;mdash; 임시 보안 자격증명을 발급하는 서비스)가 새 임시 자격증명을 발급하고, 이 자격증명은 세션이 끝나면 자동으로 만료됩니다. 별도로 값을 지정하지 않으면 세션은 1시간 동안 유효하고, 역할 설정에 따라 최대 12시간까지 늘릴 수 있습니다. 다만 역할로 다른 역할을 다시 assume하는 &lt;b&gt;역할 체이닝(role chaining)&lt;/b&gt; 은 예외입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Role chaining limits your AWS Management Console, AWS CLI or AWS API role session to a maximum of one hour. It applies regardless of the maximum session duration configured for individual roles.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AD의 서비스 계정이 보통 고정 암호를 갖고 그 암호가 유출되기 전까지 계속 유효한 것과 달리, 역할은 &lt;b&gt;애초에 훔칠 만한 장기 자격증명 자체가 없습니다&lt;/b&gt; &amp;mdash; 있는 건 곧 만료되는 세션 토큰뿐입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;변경 사항이 즉시 반영되지 않는다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;IAM은 전 세계 여러 서버에 데이터를 복제하는 방식으로 동작합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;IAM, like many other AWS services, is eventually consistent... If a request to change some data is successful, the change is committed and safely stored. However, the change must be replicated across IAM, which can take some time... We recommend that you do not include such IAM changes in the critical, high-availability code paths of your application.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;사용자&amp;middot;그룹&amp;middot;역할&amp;middot;정책을 만들거나 바꾼 직후 바로 다른 API(Application Programming Interface &amp;mdash; 프로그램끼리 주고받는 호출 인터페이스) 호출에서 그 변경이 반영 안 된 것처럼 보일 수 있습니다. AD 복제 지연과 비슷한 현상이지만, IAM 쪽은 배포 자동화 스크립트에서 &quot;역할 만들기 &amp;rarr; 곧바로 그 역할로 assume&quot;처럼 실행하면 실패할 수 있다는 뜻이라, 자동화 스크립트에는 재시도나 약간의 대기를 넣어 두는 게 안전합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 배치 스크립트에 액세스 키를 박아 넣으려는 시도&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;매일 새벽 도는 배치 스크립트가 S3 버킷에서 파일을 읽어야 하는 상황을 가정합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;순진한 시도&lt;/b&gt; 는 &quot;일단 되게 하자&quot;는 생각으로 IAM 사용자를 하나 만들고 액세스 키를 발급해서, 그 배치 스크립트가 도는 EC2 인스턴스 안 설정 파일에 키 값을 그대로 적어 두는 것입니다. 당장은 동작합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;문제&lt;/b&gt; 는 이 액세스 키가 장기 자격증명이라 만료되지 않고, 인스턴스 이미지&amp;middot;설정 파일&amp;middot;백업 어딘가에 남아 유출될 경로가 여러 갈래로 늘어난다는 데 있습니다. 도입부 시나리오의 사고가 정확히 이 경로로 났습니다 &amp;mdash; 코드 저장소에 실수로 올라간 액세스 키가 그대로 살아 있었던 것입니다. 키를 순환(rotate)하려면 수동으로 새 키를 만들고 옛 키를 지우는 절차가 필요하고, 그 사이 어딘가에서 빠뜨리기 쉽습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;정답&lt;/b&gt; 은 액세스 키를 아예 만들지 않고, EC2 인스턴스에 그 S3 버킷만 읽을 수 있는 IAM 역할을 연결하는 것입니다. 공식 문서가 권장하는 방식이 정확히 이것입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;When you're building on an AWS compute service, such as Amazon EC2 or Lambda, AWS delivers the temporary credentials of an IAM role to that compute resource. Applications written using an AWS SDK will discover and use these temporary credentials to access AWS resources, and there is no need to distribute long lived credentials for an IAM user to your workloads running on AWS.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;스크립트 코드는 한 줄도 안 바뀝니다 &amp;mdash; AWS SDK(Software Development Kit &amp;mdash; AWS 서비스를 코드에서 호출하도록 언어별로 제공되는 라이브러리 묶음)가 인스턴스에 연결된 역할의 임시 자격증명을 자동으로 찾아 씁니다. 코드 저장소에 올라갈 만한 값 자체가 애초에 없습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;액세스 키가 필요한 경우가 아예 없는 건 아닙니다 &amp;mdash; AWS 밖에서 도는 워크로드, IAM Identity Center를 지원하지 않는 서드파티 도구처럼 역할을 못 쓰는 특정 상황에는 여전히 장기 액세스 키를 씁니다. 다만 &lt;b&gt;&quot;AWS 안에서 도는 워크로드라면 역할이 먼저&quot;&lt;/b&gt; 라는 순서를 뒤집으면 안 됩니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 온프레미스 관리자가 자주 하는 오해&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 1. &quot;사람 계정도 전부 IAM 사용자로 만들면 되지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;IAM User Guide는 이 페이지 맨 앞에 경고 문구를 따로 두고 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;IAM best practices recommend that you require human users to use federation with an identity provider to access AWS using temporary credentials instead of using IAM users with long-term credentials. We recommend that you only use IAM users for specific use cases not supported by federated users.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AD에서 사람 계정을 도메인 계정으로 만드는 건 기본값이지만, IAM에서는 &lt;b&gt;사람 계정에 장기 자격증명(암호&amp;middot;액세스 키)을 발급하는 것 자체가 예외적인 상황을 위한 것&lt;/b&gt;입니다. 사람은 IAM Identity Center 같은 페더레이션으로 접근하고, IAM 사용자는 역할을 지원하지 않는 워드프레스 플러그인, IAM Identity Center를 지원하지 않는 서드파티 도구, 비상 접근용 계정처럼 정말 대안이 없는 몇몇 상황에만 남겨 두는 게 권장 방향입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 2. &quot;그룹에 역할&amp;middot;정책을 걸어두면 그룹 자체가 리소스에 접근할 수 있다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AD 그룹을 ACL의 주체(Principal)로 직접 넣던 감각을 그대로 옮기면 걸리는 지점입니다. IAM 그룹은 정책을 묶어 사용자에게 나눠 주는 편의 기능일 뿐, 그 자체가 인증되는 신원이 아닙니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You cannot identify a user group as a Principal in a policy (such as a resource-based policy) because groups relate to permissions, not authentication, and principals are authenticated IAM entities.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;그리고 AD의 중첩 그룹(그룹 안에 그룹)도 IAM에는 없습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;User groups can't be nested; they can contain only users, not other IAM groups.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;그룹은 정책을 묶어서 여러 사용자에게 한 번에 적용하는 용도로만 씁니다 &amp;mdash; 그룹 계층을 여러 단으로 설계하는 AD의 관행을 그대로 옮기려 하면 첫 단계에서 막힙니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 3. &quot;정책에 거부(Deny) 문이 없으면 기본적으로 다 허용된다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;거꾸로입니다. IAM은 &lt;b&gt;기본값이 거부&lt;/b&gt;입니다(3장) &amp;mdash; 사용자&amp;middot;역할을 새로 만들면 아무 권한이 없고, 어딘가에 명시적 허용이 있어야만 접근이 됩니다. AD의 일부 ACL 편집 화면처럼 &quot;특별히 막지 않으면 통과&quot;라는 감각으로 접근하면, 오히려 &quot;왜 아무것도 안 되지&quot;라는 반대 방향의 문제로 먼저 부딪히게 됩니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 4. &quot;루트 계정 = 도메인 관리자니까 평소 업무에도 쓰면 편하다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;공식 문서가 가장 강하게 권고하는 부분입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;We strongly recommend that you don't use the root user for your everyday tasks and that you follow the root user best practices for your AWS account.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;루트 사용자가 필요한 작업은 계정 설정 변경, 계정 종료, 그리고 이런 경우처럼 &lt;b&gt;정말 그것만 루트여야 하는 작업&lt;/b&gt;으로 한정됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Restore IAM user permissions. If the only IAM administrator accidentally revokes their own permissions, you can sign in as the root user to edit policies and restore those permissions.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 루트 계정은 &quot;제일 센 계정이라 평소에 쓰기 편한 계정&quot;이 아니라, &lt;b&gt;다른 모든 권한이 꼬였을 때 되돌리는 최후의 안전망&lt;/b&gt;에 가깝습니다. 평소 업무는 IAM Identity Center로 만든 관리자 계정으로 하고, 루트 자격증명은 MFA(Multi-factor authentication &amp;mdash; 암호 외에 별도 기기&amp;middot;앱이 생성하는 일회성 코드를 추가로 요구하는 인증 방식)를 걸어 안전하게 보관해 두는 것이 정석입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 신규 팀원 계정을 기존 관리자 계정 복제로 만든다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;팀에 새 개발자가 들어올 때마다, 기존 시니어 개발자의 IAM 사용자에 붙은 정책 목록을 그대로 복사해서 새 사용자에게 붙이는 방식으로 계정을 만들어 왔다고 가정합니다. AD에서 &quot;이 사람과 같은 부서니까 같은 그룹에 넣으면 되지&quot;라고 하던 것과 비슷한 감각입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;문제는 시니어 개발자의 정책이 그 사람이 몇 년간 맡았던 여러 프로젝트의 권한이 누적된 결과라는 데 있습니다. 신규 팀원은 당장 프로젝트 하나만 맡는데도, 복제된 정책 때문에 손댈 필요조차 없는 다른 프로젝트의 리소스까지 접근할 수 있게 됩니다. 최소 권한 원칙(3장)과 정반대 방향으로 계정이 늘어나는 셈입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;당장 취할 조치는 새 계정을 만들 때 기존 계정을 복제하지 않고, 그 사람이 맡은 업무에 필요한 권한만 골라 customer managed policy로 새로 구성하는 것입니다. 이미 복제로 만들어진 기존 계정들은 한 번에 다 고치려 하지 말고, IAM이 제공하는 마지막 접근 정보(last accessed information &amp;mdash; 어떤 정책&amp;middot;자격증명이 최근에 실제로 쓰였는지 보여주는 기능)로 안 쓰는 권한부터 순서대로 줄여 가는 편이 현실적입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 비용&amp;middot;운영 감각&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 AD 서버 자체가 라이선스&amp;middot;하드웨어 비용이 드는 인프라입니다. IAM은 이 감각과 다릅니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;IAM&amp;middot;IAM Identity Center&amp;middot;STS는 그 자체로 무료입니다.&lt;/b&gt;&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;AWS Identity and Access Management (IAM), AWS IAM Identity Center and AWS Security Token Service (AWS STS) are features of your AWS account offered at no additional charge. You are charged only when you access other AWS services using your IAM users or AWS STS temporary security credentials.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;사용자&amp;middot;그룹&amp;middot;역할&amp;middot;정책을 몇 개를 만들든, 역할을 얼마나 자주 assume하든 그 자체로는 과금되지 않습니다. 과금은 그 신원으로 실제로 건드리는 다른 AWS 서비스(EC2&amp;middot;S3 등) 쪽에서 발생합니다. 다만 예외가 하나 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;IAM Access Analyzer external access analysis is offered at no additional charge. However, you will incur charges for unused access analysis and customer policy checks.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;접근 권한을 점검해 주는 IAM Access Analyzer의 기본 외부 접근 분석은 무료지만, 안 쓰는 권한을 찾아 주는 분석과 정책 검사 일부 기능은 별도 과금 대상입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;진짜 비용은 IAM 사용료가 아니라 설계에 들이는 시간과, 잘못 설계했을 때의 사고 비용입니다.&lt;/b&gt; 온프레미스에서 장비 구매 비용을 아끼려는 감각을 IAM에 그대로 옮기면, &quot;일단 넓게 권한을 주고 나중에 정리하자&quot;는 쪽으로 흐르기 쉽습니다. 하지만 IAM 자체가 무료이기 때문에, 처음부터 최소 권한으로 세밀하게 나눠 관리해도 추가 비용이 들지 않습니다 &amp;mdash; 아낄 이유가 없는데 아끼다가, 3장 시나리오&amp;middot;4장 오해처럼 권한이 새 나가는 사고로 이어지는 쪽이 훨씬 비쌉니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 관련 개념&lt;/h2&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;IAM Identity Center(구 AWS SSO)&lt;/b&gt; &amp;mdash; 여러 AWS 계정에 대한 사람 사용자의 접근을 한곳에서 관리하는 서비스. 외부 신원 공급자와 연동하거나 자체적으로 사용자를 만들 수 있다. 사람 계정은 IAM 사용자보다 이쪽이 우선 권장된다(4장).&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS Organizations의 SCP(Service Control Policy)&lt;/b&gt; &amp;mdash; 여러 AWS 계정을 조직으로 묶어 계정 전체에 적용되는 권한 상한을 거는 기능. 개별 계정의 IAM 정책과는 별개 층위에서 작동한다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS Directory Service(Managed Microsoft AD)&lt;/b&gt; &amp;mdash; 실제 Active Directory 서버 자체를 AWS 위에서 관리형으로 운영하는 서비스. IAM과 헷갈리기 쉽지만 완전히 다른 서비스다(2장).&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS KMS(Key Management Service)&lt;/b&gt; &amp;mdash; 암호화 키를 만들고 관리하는 서비스. 그 키를 누가 쓸 수 있는지는 IAM 정책으로 통제한다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS CloudTrail&lt;/b&gt; &amp;mdash; 어느 신원이 언제 무엇을 했는지 기록하는 감사 로그 서비스. IAM으로 권한을 걸어 두는 것과, 그 권한이 실제로 어떻게 쓰였는지 사후에 추적하는 것은 별개 문제다.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;7. 한눈에 정리&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;확인할 것&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;새 사용자&amp;middot;역할&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본적으로 아무 권한이 없다 &amp;mdash; 정책을 붙여야 뭔가 할 수 있다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;정책 평가&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본값은 거부, 명시적 거부가 명시적 허용을 항상 이긴다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;identity-based / resource-based&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;같은 계정 안에서는 합집합, 계정을 넘으면 양쪽 모두 허용해야 한다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IAM 역할&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;항상 임시 자격증명, 기본 세션 1시간 &amp;middot; 역할 체이닝은 1시간 상한&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사람 계정&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IAM 사용자보다 IAM Identity Center(페더레이션) 권장&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;워크로드(EC2&amp;middot;Lambda 등)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;장기 액세스 키 대신 역할의 임시 자격증명을 쓴다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;그룹&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;정책만 묶어서 부여, Principal로 지정 불가, 중첩 불가&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;루트 사용자&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;일상 업무 금지, 계정 설정&amp;middot;복구처럼 특정 작업 전용, MFA 필수&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;변경 반영&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;즉시 전파되지 않는다(eventually consistent) &amp;mdash; 자동화 스크립트에 재시도를 둔다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;과금&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IAM&amp;middot;STS&amp;middot;Identity Center 자체는 무료, Access Analyzer 일부 기능만 유료&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/chmod-%C2%B7-chown-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EB%8B%A4-%EC%97%B4%EC%97%88%EB%8A%94%EB%8D%B0%EB%8F%84-%EA%B3%84%EC%86%8D-Permission-denied&quot;&gt;리눅스에서 권한을 다루던 감각과의 차이&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/S3-%E2%80%94-NAS-%EB%A7%88%EC%9A%B4%ED%8A%B8-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%97%B4%EB%A9%B4-%EB%B0%94%EB%A1%9C-%EA%B1%B8%EB%A6%AC%EB%8A%94-AWS%EC%9D%98-%EC%98%A4%EB%B8%8C%EC%A0%9D%ED%8A%B8-%EC%8A%A4%ED%86%A0%EB%A6%AC%EC%A7%80&quot;&gt;버킷 접근 권한이 막히는 대표적인 경우&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/EC2-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EC%84%9C%EB%B2%84-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B0%80%EC%83%81-%EC%84%9C%EB%B2%84&quot;&gt;인스턴스에 역할을 부여하는 법&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>AWS/이게 뭐야?</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/90</guid>
      <comments>https://wowpanel.tistory.com/entry/IAM-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-ADLDAP-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B3%84%EC%A0%95%C2%B7%EA%B6%8C%ED%95%9C-%EA%B4%80%EB%A6%AC#entry90comment</comments>
      <pubDate>Fri, 4 Sep 2026 15:18:21 +0900</pubDate>
    </item>
    <item>
      <title>리눅스 프로세스&amp;middot;서비스 관리 Top 10 &amp;mdash; systemctl&amp;middot;kill, 변수만 바꿔 그대로 쓰는 명령</title>
      <link>https://wowpanel.tistory.com/entry/%EB%A6%AC%EB%88%85%EC%8A%A4-%ED%94%84%EB%A1%9C%EC%84%B8%EC%8A%A4%C2%B7%EC%84%9C%EB%B9%84%EC%8A%A4-%EA%B4%80%EB%A6%AC-Top-10-%E2%80%94-systemctl%C2%B7kill-%EB%B3%80%EC%88%98%EB%A7%8C-%EB%B0%94%EA%BF%94-%EA%B7%B8%EB%8C%80%EB%A1%9C-%EC%93%B0%EB%8A%94-%EB%AA%85%EB%A0%B9</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&quot;서비스가 응답이 없다&quot;는 보고를 받으면 손이 먼저 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl restart&lt;/code&gt;로 가기 쉽습니다. 그런데 재시작은 지금 상태를 지워버리는 명령입니다 &amp;mdash; 왜 멈췄는지 볼 기회도 같이 사라집니다. 이 글은 &lt;b&gt;재시작하기 전에 먼저 확인하는&lt;/b&gt; 명령 10개를 모았습니다 &amp;mdash; 서비스가 systemd 레벨에서 살아있는지, 그 서비스의 진짜 프로세스는 뭘 하고 있는지, 그리고 신호를 보낼 때 어떤 순서로 보내야 하는지. 변수 하나만 바꿔 그대로 복붙하면 됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&quot;nginx가 응답이 없다&quot;는 보고가 들어왔습니다.&lt;/b&gt; 바로 재시작 버튼을 누르고 싶지만, 그러면 지금 멈춰 있는 이유(설정 오류인지, 메모리 부족으로 죽어가는 중인지, 자식 프로세스가 좀비로 쌓인 건지)를 확인할 기회가 같이 날아갑니다. 재시작 전에 &lt;b&gt;지금 상태를 읽는 순서&lt;/b&gt;가 필요합니다.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;이 글 쓰는 법 &amp;mdash; 변수 한 줄만 바꾸세요&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;변수가 있는 명령은 아래 형태입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=crond # &amp;larr; 이 줄의 값만 여러분이 볼 서비스(유닛)로 바꾸세요&lt;br /&gt;systemctl status &quot;$SVC&quot; --no-pager -l # &amp;larr; 상태 한눈에&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;첫 줄의 오른쪽 값만 바꾸고 그대로 붙여넣으면 됩니다.&lt;/b&gt; 출력은 전부 실제 서버(Rocky Linux 9, systemd 252)에서 실행해 그대로 옮겼습니다 &amp;mdash; 여러분 서버의 PID&amp;middot;가동 시간&amp;middot;유닛 목록은 다르게 나오는 게 정상입니다. 호스트명은 이 블로그의 도메인으로 바꿔 표기했습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;측정 환경: Rocky Linux 9.7(커널 5.14.0-611.47.1.el9_7) &amp;middot; systemd 252(252-55.el9_7.8.rocky.0.1, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl&lt;/code&gt;) &amp;middot; procps-ng 3.3.17(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ps&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;kill&lt;/code&gt;) &amp;middot; psmisc 23.4(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;pstree&lt;/code&gt;). 앞 7개는 전부 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sudo&lt;/code&gt; 없이 됩니다. 뒤 3개(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;kill&lt;/code&gt; 계열)는 &lt;b&gt;자신이 소유한 프로세스&lt;/b&gt;에만 root 없이 동작합니다 &amp;mdash; 다른 사용자 소유 프로세스에 신호를 보내려면 root가 필요합니다(이유는 8번에서 다룹니다). 서비스를 &lt;b&gt;재시작&lt;/b&gt;하는 명령은 이 글의 범위 밖입니다 &amp;mdash; 맨 끝 경고 박스를 보세요.&lt;/blockquote&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;서비스가 살아있나 &amp;mdash; systemd 레벨&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;PID 레벨로 내려가기&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;신호 보내기 &amp;mdash; 안전한 순서&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;전체 치트시트&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. 서비스가 살아있나 &amp;mdash; systemd 레벨&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;1) 상태 한눈에&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 보고를 받으면 가장 먼저 치는 명령입니다. 살아있는지, 언제부터인지, 최근에 뭘 남겼는지가 한 화면에 나옵니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=crond # &amp;larr; 볼 서비스(유닛) 이름&lt;br /&gt;systemctl status &quot;$SVC&quot; --no-pager -l # &amp;larr; --no-pager: 페이저 없이 한 번에 출력, -l(--full): 긴 줄 안 자름&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SVC=crond&lt;br /&gt;$ systemctl status &quot;$SVC&quot; --no-pager -l&lt;br /&gt;● crond.service - Command Scheduler&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; preset: enabled)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Active: active (running) since Mon 2026-07-13 19:41:35 KST; 1 month 11 days ago&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Main PID: 1474 (crond)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Tasks: 1 (limit: 98164)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Memory: 2.1M (peak: 11.7M)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;CPU: 1min 13.213s&lt;br /&gt;&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com CROND[3244130]: (root) CMD (run-parts /etc/cron.hourly)&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com anacron[3244141]: Anacron started on 2026-08-25&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com anacron[3244141]: Normal exit (0 jobs run)&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com run-parts[3244143]: (/etc/cron.hourly) finished 0anacron&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com CROND[3244129]: (root) CMDEND (run-parts /etc/cron.hourly)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Active:&lt;/code&gt; 줄이 판단의 시작점입니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;active (running)&lt;/code&gt; 말고도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;activating&lt;/code&gt;(뜨는 중)&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;deactivating&lt;/code&gt;(내려가는 중)&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;failed&lt;/code&gt;(비정상 종료)가 있습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-l&lt;/code&gt;(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--full&lt;/code&gt;)을 안 붙이면 긴 줄이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;...&lt;/code&gt;로 잘려 맨 아래 로그 메시지 끝이 안 보일 수 있습니다. 그 로그 몇 줄은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;journalctl -u&lt;/code&gt;를 요약해 보여주는 것일 뿐이라, 더 앞뒤로 보려면 별도로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;journalctl -u &quot;$SVC&quot;&lt;/code&gt;가 필요합니다. 원래 출력에는 이 아래 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;CGroup:&lt;/code&gt; 항목으로 실제 하위 프로세스 트리도 붙지만, 트리 연결선에 이 블로그 스킨에서 깨질 수 있는 상자 문자가 쓰여 여기서는 뺐습니다 &amp;mdash; 그 트리는 5)번 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;pstree&lt;/code&gt;로 대신 봅니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;2) 스크립트에서 바로 쓰는 짧은 답&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 사람이 읽는 게 아니라, 배포 스크립트나 헬스체크에서 &quot;떠 있나/자동시작인가&quot;만 참&amp;middot;거짓으로 필요할 때.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=crond # &amp;larr; 볼 서비스&lt;br /&gt;systemctl is-active &quot;$SVC&quot;; echo &quot;rc=$?&quot; # &amp;larr; 떠 있는지만 참&amp;middot;거짓으로, 종료 코드로 판단&lt;br /&gt;systemctl is-enabled &quot;$SVC&quot;; echo &quot;rc=$?&quot; # &amp;larr; 재부팅해도 자동 시작인지, 역시 종료 코드로 판단&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SVC=crond&lt;br /&gt;$ systemctl is-active &quot;$SVC&quot;; echo &quot;rc=$?&quot;&lt;br /&gt;active&lt;br /&gt;rc=0&lt;br /&gt;$ systemctl is-enabled &quot;$SVC&quot;; echo &quot;rc=$?&quot;&lt;br /&gt;enabled&lt;br /&gt;rc=0&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;없는 서비스 이름으로 시도하면 어떻게 되는지도 같이 확인해 둡니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ systemctl is-active nonexist-svc-xyz; echo &quot;rc=$?&quot;&lt;br /&gt;inactive&lt;br /&gt;rc=3&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man systemctl&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;is-active&lt;/code&gt; 설명:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Check whether any of the specified units are active (i.e. running). Returns an exit code 0 if at least one is active, or non-zero otherwise. Unless --quiet is specified, this will also print the current unit state to standard output.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;출력 문자열이 아니라 종료 코드(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;$?&lt;/code&gt;)로 분기하세요&lt;/b&gt; &amp;mdash; 사람이 읽는 상태 이름은 systemd 버전마다 늘어날 수 있지만(예: &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;activating&lt;/code&gt;), 스크립트가 기대하는 건 &quot;떠 있다/아니다&quot; 둘뿐입니다. 없는 유닛 이름을 주면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;active&lt;/code&gt;가 아니라 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;inactive&lt;/code&gt;로 나온다는 점도 유의하세요 &amp;mdash; 오타로 유닛 이름을 잘못 줘도 &quot;죽어있다&quot;처럼 보이는 결과가 나옵니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;3) 이 서버에서 지금 실패 중인 서비스 전체 훑기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 특정 서비스 하나가 아니라 &quot;이 서버 전체에서 지금 뭐가 고장 나 있나&quot;를 한 번에 볼 때. 장애 조사를 시작할 때 가장 먼저 던져볼 만한 질문입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;systemctl list-units --type=service --state=failed --no-pager # &amp;larr; 실패 상태 서비스만 걸러서&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ systemctl list-units --type=service --state=failed --no-pager&lt;br /&gt;&amp;nbsp;&amp;nbsp;UNIT LOAD ACTIVE SUB DESCRIPTION&lt;br /&gt;0 loaded units listed.&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--type=service&lt;/code&gt;로 서비스 유닛만, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--state=failed&lt;/code&gt;로 그중 실패한 것만 걸러서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--no-pager&lt;/code&gt;로 한 번에 봅니다. 이 서버는 지금 실패한 서비스가 &lt;b&gt;0개&lt;/b&gt;입니다 &amp;mdash; 이게 정상 상태입니다. 뭔가 있다면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;UNIT&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;LOAD&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ACTIVE&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SUB&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;DESCRIPTION&lt;/code&gt; 다섯 열로 한 줄씩 나오고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ACTIVE&lt;/code&gt; 열에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;failed&lt;/code&gt;가 찍힙니다. 재현하려고 일부러 서비스를 죽이지는 않았습니다 &amp;mdash; 이 명령의 값어치는 지금 이 서버처럼 &lt;b&gt;평소에 정기적으로 0개인지 확인해 두는 것&lt;/b&gt;에 있습니다. 그래야 나중에 한 줄이라도 뜨는 순간 바로 눈에 띕니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;4) 실제 적용 중인 설정 확인&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; &quot;이 서비스가 재시작할 때 자동으로 다시 뜨게 설정돼 있나&quot;, &quot;누가 override 파일로 옵션을 덮어썼나&quot;를 확인할 때. 파일 경로를 직접 찾아 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;cat&lt;/code&gt;하지 않아도 됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=crond # &amp;larr; 볼 서비스&lt;br /&gt;systemctl cat &quot;$SVC&quot; --no-pager # &amp;larr; 원본 유닛 파일 + override(있다면)를 이어붙여 --no-pager로 한 번에&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SVC=crond&lt;br /&gt;$ systemctl cat &quot;$SVC&quot; --no-pager&lt;br /&gt;# /usr/lib/systemd/system/crond.service&lt;br /&gt;[Unit]&lt;br /&gt;Description=Command Scheduler&lt;br /&gt;After=auditd.service nss-user-lookup.target systemd-user-sessions.service time-sync.target ypbind.service autofs.service&lt;br /&gt;&lt;br /&gt;[Service]&lt;br /&gt;EnvironmentFile=/etc/sysconfig/crond&lt;br /&gt;ExecStart=/usr/sbin/crond -n $CRONDARGS&lt;br /&gt;ExecReload=/bin/kill -HUP $MAINPID&lt;br /&gt;KillMode=process&lt;br /&gt;Restart=on-failure&lt;br /&gt;RestartSec=30s&lt;br /&gt;&lt;br /&gt;[Install]&lt;br /&gt;WantedBy=multi-user.target&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. 맨 위 주석 줄(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;# /usr/lib/systemd/system/crond.service&lt;/code&gt;)이 실제로 읽은 파일 경로입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/etc/systemd/system/&lt;/code&gt;에 override(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl edit&lt;/code&gt;로 만든 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;.d/override.conf&lt;/code&gt;)가 있으면 &lt;b&gt;이 명령이 그것까지 순서대로 이어 붙여서&lt;/b&gt; 보여줍니다 &amp;mdash; 그래서 &quot;설정 파일을 봤는데 내가 기대한 옵션이 없다&quot;는 혼란은 대부분 override 파일을 못 찾아서 생깁니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Restart=on-failure&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;RestartSec=30s&lt;/code&gt;처럼 &lt;b&gt;이 서비스가 죽으면 자동으로 재시작하는지, 몇 초 뒤인지&lt;/b&gt;도 여기서 바로 보입니다 &amp;mdash; 뒤 8~10번에서 신호를 보낼 때 이 값을 미리 알고 있어야 &quot;내가 죽였는데 왜 다시 떠 있지&quot;에 안 놀랍니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. PID 레벨로 내려가기&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;systemd가 &quot;이 서비스는 살아있다&quot;고 말해도, 그 서비스가 실제로 &lt;b&gt;어떤 프로세스들&lt;/b&gt;로 이뤄져 있는지는 다른 질문입니다. 여기서부터는 systemd 단위가 아니라 &lt;b&gt;PID&lt;/b&gt;를 기준으로 확인합니다 &amp;mdash; 그 PID는 1)의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl status&lt;/code&gt; 출력에 있는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Main PID&lt;/code&gt; 줄에서 그대로 읽거나, 아래 5)처럼 따로 조회할 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;5) 이 서비스가 실제로 거느린 자식 프로세스들&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 서비스 하나가 자식 프로세스를 여러 개 거느리는 구조(워커, 커넥션 핸들러)일 때, &quot;지금 몇 개나 떠 있고 어떻게 연결돼 있나&quot;를 트리로 봅니다. 1)에서 본 것처럼 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl status&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Main PID&lt;/code&gt; 줄을 그대로 써도 되고, 서비스명만 알고 있어 그 값만 스크립트로 뽑고 싶으면 아래처럼 따로 조회할 수도 있습니다 &amp;mdash; 여기서는 자식 프로세스가 여럿 딸린 모습을 보여주려고 (자식이 없는) 크론 대신 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sshd&lt;/code&gt;로 바꿔 시연합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=sshd # &amp;larr; 이번엔 sshd로 확인합니다&lt;br /&gt;systemctl show &quot;$SVC&quot; -p MainPID # &amp;larr; -p MainPID: 수십 개 속성 중 Main PID 값 하나만 뽑아서&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SVC=sshd&lt;br /&gt;$ systemctl show &quot;$SVC&quot; -p MainPID&lt;br /&gt;MainPID=1459&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;PID=1459 # &amp;larr; 방금 확인한 sshd의 Main PID&lt;br /&gt;pstree -p &quot;$PID&quot; # &amp;larr; -p: 트리에 PID 숫자까지 같이 표시&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ PID=1459&lt;br /&gt;$ pstree -p &quot;$PID&quot;&lt;br /&gt;sshd(1459)-+-sshd(2734881)---sshd(2734885)---bash(2734886)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;`-sshd(3266055)---sshd(3266058)---bash(3266059)---pstree(3266088)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sshd(1459)&lt;/code&gt;가 리스너 본체, 그 아래로 뻗은 두 줄이 &lt;b&gt;지금 연결된 세션 두 개&lt;/b&gt;입니다 &amp;mdash; 세션마다 인증 전용 자식(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sshd&lt;/code&gt;)이 한 번 더 갈라지고, 그 아래 로그인 셸(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;bash&lt;/code&gt;)이 붙습니다. 이 서버에 지금 몇 명이 접속해 있는지, 방금 실행한 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;pstree&lt;/code&gt; 자신도 그 트리 끝에 잡힌 걸 볼 수 있습니다. 서비스가 워커 프로세스를 여러 개 fork하는 구조(예: nginx)라면, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Main PID&lt;/code&gt; 하나 아래 워커 수만큼 가지가 뻗은 모습으로 나타나 &quot;지금 워커가 몇 개 떠 있나&quot;를 바로 셀 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;6) PID 하나의 상태 코드 읽기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 특정 PID가 살아는 있는데 응답이 없을 때. &quot;실행 중&quot;과 &quot;멈춰 있음&quot;은 같은 게 아닙니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;STAT&lt;/code&gt; 열이 그 차이를 말해줍니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;PID=1474 # &amp;larr; 확인할 PID (여기선 crond)&lt;br /&gt;ps -o pid,ppid,stat,etime,cmd -p &quot;$PID&quot; # &amp;larr; -o로 볼 열을 pid&amp;middot;ppid&amp;middot;상태&amp;middot;경과시간&amp;middot;명령줄로 지정, -p로 이 PID만&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ PID=1474&lt;br /&gt;$ ps -o pid,ppid,stat,etime,cmd -p &quot;$PID&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PPID STAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ELAPSED CMD&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;1474&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1 Ss&amp;nbsp;&amp;nbsp;&amp;nbsp;42-05:31:02 /usr/sbin/crond -n&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ELAPSED&lt;/code&gt;는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man ps&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;etime&lt;/code&gt; 설명대로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;[[DD-]hh:]mm:ss&lt;/code&gt; 형식입니다 &amp;mdash; 이 서버의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;42-05:31:02&lt;/code&gt;는 42일 5시간 31분입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;STAT&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Ss&lt;/code&gt;는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man ps&lt;/code&gt;의 PROCESS STATE CODES에서:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;S interruptible sleep (waiting for an event to complete)&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;s is a session leader&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 &quot;지금 할 일이 없어 이벤트를 기다리는 중이고, 이 세션의 우두머리&quot;라는 뜻입니다 &amp;mdash; crond는 원래 대부분의 시간을 이 상태로 보냅니다. 여기서 진짜 문제 신호는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;D&lt;/code&gt;(uninterruptible sleep, 보통 디스크 I/O 대기 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Ctrl+C&lt;/code&gt;도 안 먹고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;kill&lt;/code&gt;도 안 먹는 상태)와 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Z&lt;/code&gt;(defunct/zombie, 종료됐는데 부모가 아직 수거를 안 한 상태)입니다. 이 서버 전체 프로세스의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;STAT&lt;/code&gt; 분포를 한 번 세어 보면:&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ ps -eo stat --no-headers | sort | uniq -c | sort -rn | head&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;90 I&amp;lt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;86 S&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;84 Sl&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;69 Ss&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;49 Ssl&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;35 I&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2 SN&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1 Ss+&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1 SNsl&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1 SNs&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;D&lt;/code&gt;도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Z&lt;/code&gt;도 없는 게 정상입니다 &amp;mdash; 있다면 그 줄의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;PID&lt;/code&gt;로 바로 6)을 다시 돌려 어떤 프로세스인지 확인하세요.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;7) 열어 둔 파일&amp;middot;소켓 개수로 누수 의심하기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 메모리는 안정적인데 시간이 지날수록 서비스가 느려지거나 &quot;Too many open files&quot;가 뜰 때. 파일 디스크립터(FD) 누수를 의심하는 첫 확인입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;PID=3602303 # &amp;larr; 확인할 PID (자신이 소유한 프로세스여야 root 없이 됩니다)&lt;br /&gt;ls /proc/&quot;$PID&quot;/fd | wc -l # &amp;larr; fd 디렉터리 안 항목(열린 파일 하나당 하나)을 세어 개수만&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ PID=3602303&lt;br /&gt;$ ls /proc/&quot;$PID&quot;/fd | wc -l&lt;br /&gt;14&lt;br /&gt;$ ps -o pid,ppid,stat,etime,cmd -p &quot;$PID&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PPID STAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ELAPSED CMD&lt;br /&gt;3602303 3602278 Ssl&amp;nbsp;&amp;nbsp;&amp;nbsp;8-08:29:11 java -XX:+UseG1GC -XX:MaxRAMPercentage=60.0 -Djava.security.egd=file:/dev/./urandom -jar /app/app.jar&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man proc&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/proc/pid/fd/&lt;/code&gt; 설명대로:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;This is a subdirectory containing one entry for each file which the process has open, named by its file descriptor, and which is a symbolic link to the actual file. Thus, 0 is standard input, 1 standard output, 2 standard error, and so on.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;숫자 하나가 열린 파일 하나(또는 소켓&amp;middot;파이프 하나)입니다. 한 번 본 숫자는 기준값일 뿐 그 자체로는 의미가 없습니다 &amp;mdash; &lt;b&gt;몇 시간 간격으로 다시 재서 계속 늘어나기만 하는지&lt;/b&gt;가 누수의 신호입니다(연결마다 여닫는 게 정상이라면 오르내려야 합니다). 남의 프로세스는 권한 오류로 막힙니다 &amp;mdash; 이 서버의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sshd&lt;/code&gt;(root 소유, PID 1459)로 시도하면:&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ ls /proc/1459/fd&lt;br /&gt;ls: cannot open directory '/proc/1459/fd': 허가 거부&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;정확한 한도 대비 사용량&lt;/b&gt;을 보려면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;cat /proc/&quot;$PID&quot;/limits&lt;/code&gt;에서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Max open files&lt;/code&gt; 줄과 비교하세요 &amp;mdash; 이 글은 개수를 세는 것까지만 다룹니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 신호 보내기 &amp;mdash; 안전한 순서&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;여기서부터는 프로세스에 실제로 무언가를 하는 명령입니다. &lt;b&gt;순서가 중요합니다&lt;/b&gt; &amp;mdash; 존재 확인(8) &amp;rarr; 정상 종료 요청(9) &amp;rarr; 그래도 안 죽을 때만 강제 종료(10). 8)은 신호를 안 보내는 조회라 아무 PID로나 시도해도 안전하지만, 실제로 신호를 보내는 9)&amp;middot;10)의 데모는 이 계정(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;wowpanel&lt;/code&gt;)이 직접 띄운 프로세스로만 했습니다 &amp;mdash; 운영 서비스를 대상으로 재현하지 않았습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;8) 신호 없이 존재만 확인&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 실제로 신호를 보내기 전에, 그 PID가 지금도 그 프로세스가 맞는지 먼저 확인합니다. PID는 재사용되므로, 한참 전에 적어둔 PID로 바로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;kill&lt;/code&gt;부터 날리면 그사이 종료되고 새로 뜬 &lt;b&gt;다른 프로세스&lt;/b&gt;를 잘못 건드릴 수 있습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;PID=3267299 # &amp;larr; 확인할 PID&lt;br /&gt;kill -0 &quot;$PID&quot;; echo &quot;rc=$?&quot; # &amp;larr; -0: 신호는 안 보내고 존재&amp;middot;권한만 확인, 결과는 종료 코드로&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ PID=3267299&lt;br /&gt;$ kill -0 &quot;$PID&quot;; echo &quot;rc=$?&quot;&lt;br /&gt;rc=0&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man 2 kill&lt;/code&gt;의 설명대로:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If sig is 0, then no signal is sent, but existence and permission checks are still performed; this can be used to check for the existence of a process ID or process group ID that the caller is permitted to signal.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;신호 0은 실제로 아무것도 보내지 않습니다&lt;/b&gt; &amp;mdash; 종료 코드만으로 존재 여부를 판단합니다(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0&lt;/code&gt;이면 있음, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;1&lt;/code&gt;이면 없거나 권한 없음). 신호를 보낼 권한 자체는 같은 man 페이지가 이어서 정의합니다:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;For a process to have permission to send a signal, it must either be privileged (under Linux: have the CAP_KILL capability in the user namespace of the target process), or the real or effective user ID of the sending process must equal the real or saved set-user-ID of the target process. In the case of SIGCONT, it suffices when the sending and receiving processes belong to the same session. (Historically, the rules were different; see NOTES.)&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;소유자가 같아야 root 없이 신호가 통합니다&lt;/b&gt;(마지막 문장의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGCONT&lt;/code&gt; 예외는 이 글이 다루는 TERM&amp;middot;KILL&amp;middot;신호 0에는 해당하지 않습니다). &amp;mdash; 그래서 앞서 이 글 쓰는 법에서 &quot;뒤 3개는 자신이 소유한 프로세스에만&quot; 된다고 한 것입니다. root 소유 프로세스(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;crond&lt;/code&gt;, PID 1474)로 시도하면:&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ kill -0 1474; echo &quot;rc=$?&quot;&lt;br /&gt;bash: kill: (1474) - 명령을 허용하지 않음&lt;br /&gt;rc=1&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;종료 코드는 존재하지 않을 때와 똑같이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;1&lt;/code&gt;입니다&lt;/b&gt; &amp;mdash; 코드만으로는 &quot;없다&quot;와 &quot;권한이 없다&quot;를 구분하지 못하고, 메시지 문구(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;그런 프로세스가 없음&lt;/code&gt; vs &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;명령을 허용하지 않음&lt;/code&gt;)로만 구분됩니다. 프로세스가 아예 없으면 이렇게 나옵니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ kill -0 999999999; echo &quot;rc=$?&quot;&lt;br /&gt;bash: kill: (999999999) - 그런 프로세스가 없음&lt;br /&gt;rc=1&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;9) 정상 종료 요청 &amp;mdash; TERM, 기본값&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 실제로 멈추게 해야 할 때 &lt;b&gt;항상 이걸 먼저&lt;/b&gt; 시도합니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;kill $PID&lt;/code&gt;라고만 쳐도 이 신호가 나갑니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;PID=3267299 # &amp;larr; 위 8)에서 존재를 확인한 그 PID&lt;br /&gt;kill -15 &quot;$PID&quot; # &amp;larr; -15(TERM): 정상 종료를 요청, 신호 번호를 안 주면 이게 기본값&lt;br /&gt;sleep 1 # &amp;larr; 프로세스가 스스로 정리하고 종료할 시간을 잠깐 줌&lt;br /&gt;kill -0 &quot;$PID&quot;; echo &quot;rc=$?&quot; # &amp;larr; 신호 0으로 다시 존재 확인&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ PID=3267299&lt;br /&gt;$ kill -15 &quot;$PID&quot;&lt;br /&gt;$ sleep 1&lt;br /&gt;$ kill -0 &quot;$PID&quot;; echo &quot;rc=$?&quot;&lt;br /&gt;bash: kill: (3267299) - 그런 프로세스가 없음&lt;br /&gt;rc=1&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; TERM은 &lt;b&gt;프로세스가 직접 처리할 기회를 주는&lt;/b&gt; 신호입니다. 정상적으로 짜인 서비스는 이 신호를 받으면 열린 연결을 정리하고, 진행 중인 트랜잭션을 마무리한 뒤 스스로 종료합니다 &amp;mdash; 위 결과처럼 신호를 보내자마자 사라진 게 정상입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;kill&lt;/code&gt;에 번호를 안 주면 기본값이 바로 이 15번(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TERM&lt;/code&gt;)입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;10) 그래도 안 죽으면 &amp;mdash; KILL, 최후 수단&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; TERM을 보냈는데도 프로세스가 계속 살아있을 때. 응답이 없는 프로세스, 또는 의도적으로(혹은 버그로) TERM을 무시하도록 짜인 프로세스에 마지막으로 씁니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;TERM을 일부러 무시하도록 만든 프로세스로 차이를 보입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;kill -15 3267503 # &amp;larr; TERM을 무시하도록 만든 프로세스에 정상 종료 요청&lt;br /&gt;sleep 1 # &amp;larr; 종료 처리 시간을 잠깐 줌&lt;br /&gt;kill -0 3267503; echo &quot;still-alive-rc=$?&quot; # &amp;larr; 신호 0으로 살아있는지 재확인&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ kill -15 3267503&lt;br /&gt;$ sleep 1&lt;br /&gt;$ kill -0 3267503; echo &quot;still-alive-rc=$?&quot;&lt;br /&gt;still-alive-rc=0&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;TERM이 무시됐습니다(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rc=0&lt;/code&gt;, 아직 살아있음). 이제 KILL을 보냅니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;PID=3267503 # &amp;larr; 위에서 TERM이 안 먹힌 그 PID&lt;br /&gt;kill -9 &quot;$PID&quot; # &amp;larr; -9(KILL): 커널이 즉시 강제 종료, 프로세스가 막을 수 없음&lt;br /&gt;sleep 1 # &amp;larr; 종료 확인 전 잠깐 대기&lt;br /&gt;kill -0 &quot;$PID&quot; 2&amp;gt;&amp;amp;1; echo &quot;gone-rc=$?&quot; # &amp;larr; 신호 0으로 최종 확인, 2&amp;gt;&amp;amp;1로 에러 메시지도 같이 받음&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ PID=3267503&lt;br /&gt;$ kill -9 &quot;$PID&quot;&lt;br /&gt;$ sleep 1&lt;br /&gt;$ kill -0 &quot;$PID&quot; 2&amp;gt;&amp;amp;1; echo &quot;gone-rc=$?&quot;&lt;br /&gt;bash: kill: (3267503) - 그런 프로세스가 없음&lt;br /&gt;gone-rc=1&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man 7 signal&lt;/code&gt;이 이 차이를 명시합니다:&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;TERM(15)은 프로세스가 무시하거나 자체 처리 루틴으로 가로챌 수 있지만, &lt;b&gt;KILL(9)은 커널이 프로세스에게 물어보지 않고 직접 정리합니다&lt;/b&gt; &amp;mdash; 그래서 항상 통합니다. 대신 프로세스가 자기 정리(임시 파일 삭제, 버퍼 flush, 연결 정상 종료)를 할 기회 자체가 없습니다 &amp;mdash; 그래서 9)의 TERM을 먼저 시도하고, 정말 안 될 때만 여기로 옵니다. 그리고 한 가지 더 &amp;mdash; &lt;b&gt;부모 프로세스를 KILL해도 그 자식까지 같이 사라지는 게 아닙니다.&lt;/b&gt; 위 데모의 부모(3267503)가 거느리던 자식(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sleep 3600&lt;/code&gt;, PID 3267525)은 부모가 죽은 뒤에도 그대로 남아 있었고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;PPID&lt;/code&gt;만 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;1&lt;/code&gt;(init)로 바뀌어 있었습니다 &amp;mdash; 고아가 되어 다른 프로세스가 됩니다. 서비스 전체를 확실히 내리려면 개별 PID가 아니라 systemd 단위로 제어해야 하는 이유가 여기 있습니다(맨 끝 경고 박스 참고).&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 전체 치트시트&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;한 번에 모아 둡니다. 변수(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SVC&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;PID&lt;/code&gt;)만 바꿔서 그대로 쓰세요.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;# ── 서비스가 살아있나 (systemd 레벨, root 불필요)&lt;br /&gt;SVC=crond; systemctl status &quot;$SVC&quot; --no-pager -l # &amp;larr; 상태 한눈에&lt;br /&gt;SVC=crond; systemctl is-active &quot;$SVC&quot;; systemctl is-enabled &quot;$SVC&quot; # &amp;larr; 스크립트용 짧은 답&lt;br /&gt;systemctl list-units --type=service --state=failed --no-pager # &amp;larr; 실패 서비스 전체 훑기&lt;br /&gt;SVC=crond; systemctl cat &quot;$SVC&quot; --no-pager # &amp;larr; 실제 적용 중인 설정(override 포함)&lt;br /&gt;&lt;br /&gt;# ── PID 레벨로 내려가기 (root 불필요)&lt;br /&gt;PID=1459; pstree -p &quot;$PID&quot; # &amp;larr; 자식 프로세스 트리&lt;br /&gt;PID=1474; ps -o pid,ppid,stat,etime,cmd -p &quot;$PID&quot; # &amp;larr; STAT 코드 확인&lt;br /&gt;PID=1234; ls /proc/&quot;$PID&quot;/fd | wc -l # &amp;larr; 열어 둔 파일 개수 (자신 소유만)&lt;br /&gt;&lt;br /&gt;# ── 신호 보내기 (자신이 소유한 프로세스만 root 없이 됨, 순서대로)&lt;br /&gt;PID=1234; kill -0 &quot;$PID&quot;; echo &quot;rc=$?&quot; # &amp;larr; ① 존재만 확인, 신호는 안 감&lt;br /&gt;PID=1234; kill -15 &quot;$PID&quot; # &amp;larr; ② 정상 종료 요청 (기본값, 항상 먼저)&lt;br /&gt;PID=1234; kill -9 &quot;$PID&quot; # &amp;larr; ③ 그래도 안 죽을 때만 최후 수단&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;마무리&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&quot;응답이 없다&quot;는 보고 하나로 바로 재시작하지 않는 게 이 10개의 요점입니다. 1~4는 systemd가 보는 상태(살아있나, 왜 그렇게 설정됐나), 5~7은 그 서비스가 실제로 어떤 프로세스로 이뤄져 있는지, 8~10은 멈추게 해야 할 때 어떤 신호를 어떤 순서로 보내는지입니다. TERM으로 안 죽는 프로세스를 만났다면 그 자체가 정보입니다 &amp;mdash; 정상 종료 루틴이 없거나, 어딘가에 멈춰 있다는 뜻이니 KILL로 넘어가기 전에 왜 그런지 한 번은 의심해 보세요.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;참고&lt;/h3&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man systemctl&lt;/code&gt; &amp;middot; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man ps&lt;/code&gt; &amp;middot; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man proc&lt;/code&gt; &amp;middot; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man 2 kill&lt;/code&gt; &amp;middot; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man 7 signal&lt;/code&gt; &amp;middot; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man pstree&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #dc2626; background: #fef2f2 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;서비스를 실제로 재시작하려면&lt;/b&gt; &amp;mdash; 위 10개로 &quot;언제부터, 왜 멈춰 보이는지&quot;까지 확인했다면, 다음은 이 세 줄입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=서비스이름 # &amp;larr; 재시작할 유닛&lt;br /&gt;systemctl list-dependencies --reverse &quot;$SVC&quot; # &amp;larr; ① 먼저: 나에게 의존하는 서비스 확인 (root 불필요)&lt;br /&gt;sudo systemctl restart &quot;$SVC&quot; # &amp;larr; ② 정지 후 재시작 (start+stop이 한 번에)&lt;br /&gt;sudo systemctl status &quot;$SVC&quot; --no-pager -l # &amp;larr; ③ 다시 뜬 뒤 상태 확인&lt;br /&gt;sudo journalctl -u &quot;$SVC&quot; -n 20 --no-pager # &amp;larr; ④ 재시작 전후 로그&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;②~④는 root 권한이 필요해서 &lt;b&gt;이 글에서는 실행&amp;middot;검증하지 않았습니다&lt;/b&gt; &amp;mdash; 이 프로젝트는 검증 안 된 출력을 싣지 않는 걸 원칙으로 하고, 운영 서버에서 sudo도 쓰지 않습니다. ①은 이 글의 다른 명령과 마찬가지로 읽기 전용이라 sudo가 필요 없습니다. 실행하기 전에 반드시:&lt;/p&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;①에서 나온 목록이 비어 있지 않다면, 재시작이 그 서비스들에도 순간적인 단절을 일으킬 수 있다는 뜻입니다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;restart&lt;/code&gt;는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;stop&lt;/code&gt; 다음 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;start&lt;/code&gt;를 순서대로 하는 것뿐이라, &lt;b&gt;그사이 짧게라도 다운타임이 생깁니다.&lt;/b&gt; 무중단이 필요하면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;reload&lt;/code&gt;(설정만 다시 읽는, 서비스가 지원할 때만 되는 명령)가 되는지 먼저 확인하세요.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;4)번(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl cat&lt;/code&gt;)에서 본 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Restart=&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;RestartSec=&lt;/code&gt; 값을 미리 알아두세요 &amp;mdash; 재시작 정책에 따라 여러분이 아무것도 안 해도 이미 자동으로 재시작이 걸려 있었을 수 있습니다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;재시작 후에는 반드시 1)번(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl status&lt;/code&gt;)으로 &lt;b&gt;다시 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;active (running)&lt;/code&gt;이 됐는지&lt;/b&gt;, 3)번(실패 서비스 훑기)으로 다른 서비스까지 덩달아 실패하지 않았는지 확인하세요.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/systemctl-%E2%80%94-%EB%B0%B0%ED%8F%AC%EB%8A%94-%EB%81%9D%EB%82%AC%EB%8A%94%EB%8D%B0-%EC%84%9C%EB%B9%84%EC%8A%A4%EA%B0%80-%EC%95%88-%EB%9C%B9%EB%8B%88%EB%8B%A4&quot;&gt;서비스가 안 뜰 때 원인을 찾는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/kill-%EC%82%AC%EC%9A%A9%EB%B2%95-%EC%A2%85%EB%A3%8C%ED%96%88%EB%8A%94%EB%8D%B0-%EC%99%9C-%EC%95%88-%EC%A3%BD%EC%8A%B5%EB%8B%88%EA%B9%8C&quot;&gt;종료했는데도 안 죽는 프로세스&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/ps-%EB%A1%9C%EA%B7%B8%EA%B0%80-%EC%97%86%EB%8A%94-%EC%9E%A5%EC%95%A0-%EC%95%9E%EC%97%90%EC%84%9C-%ED%94%84%EB%A1%9C%EC%84%B8%EC%8A%A4%EB%A5%BC-%EC%9D%BD%EB%8A%94-%EB%B2%95&quot;&gt;프로세스 상태를 읽는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/crontab-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EC%83%88%EB%B2%BD-%EB%B0%B0%EC%B9%98%EA%B0%80-%EC%A1%B0%EC%9A%A9%ED%9E%88-%EC%A3%BD%EB%8A%94-%EC%9D%B4%EC%9C%A0&quot;&gt;새벽 배치가 조용히 죽는 이유&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>리눅스/장애 M+1분</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/49</guid>
      <comments>https://wowpanel.tistory.com/entry/%EB%A6%AC%EB%88%85%EC%8A%A4-%ED%94%84%EB%A1%9C%EC%84%B8%EC%8A%A4%C2%B7%EC%84%9C%EB%B9%84%EC%8A%A4-%EA%B4%80%EB%A6%AC-Top-10-%E2%80%94-systemctl%C2%B7kill-%EB%B3%80%EC%88%98%EB%A7%8C-%EB%B0%94%EA%BF%94-%EA%B7%B8%EB%8C%80%EB%A1%9C-%EC%93%B0%EB%8A%94-%EB%AA%85%EB%A0%B9#entry49comment</comments>
      <pubDate>Fri, 4 Sep 2026 08:13:38 +0900</pubDate>
    </item>
    <item>
      <title>Route 53 &amp;mdash; DNS 서버 하나가 하던 일을 세 갈래로 나눈 이유</title>
      <link>https://wowpanel.tistory.com/entry/Route-53-%E2%80%94-DNS-%EC%84%9C%EB%B2%84-%ED%95%98%EB%82%98%EA%B0%80-%ED%95%98%EB%8D%98-%EC%9D%BC%EC%9D%84-%EC%84%B8-%EA%B0%88%EB%9E%98%EB%A1%9C-%EB%82%98%EB%88%88-%EC%9D%B4%EC%9C%A0</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 로드밸런서 어플라이언스(F5 BIG-IP&amp;middot;Citrix ADC 같은 장비) 한 대에 VIP(Virtual IP &amp;mdash; 클라이언트에게 노출하는 대표 IP 주소, 실제 서버들은 이 뒤에 숨어 있다) 하나를 만들고, 그 안에서 4계층 포트 기반 분산과 7계층 URL&amp;middot;호스트 기반 라우팅을 같은 화면에서 같이 설정했습니다. 헬스 모니터도, 퍼시스턴스(persistence &amp;mdash; 같은 클라이언트를 같은 서버로 계속 보내는 세션 고정)도 한 장비 설정 안에 다 있었습니다. AWS는 이 하나의 어플라이언스를 세 갈래로 쪼갭니다 &amp;mdash; 7계층에서 동작하는 &lt;b&gt;ALB&lt;/b&gt;(Application Load Balancer), 4계층에서 동작하는 &lt;b&gt;NLB&lt;/b&gt;(Network Load Balancer), 그리고 두 계층에 걸쳐 있었지만 지금은 구세대로 분류된 &lt;b&gt;CLB&lt;/b&gt;(Classic Load Balancer)입니다. 이름은 전부 &quot;로드밸런서&quot;지만 계층이 다르면 그 계층에서만 볼 수 있는 정보와 그 계층에만 있는 기능이 갈리고, 이 구분을 놓치면 온프레미스에서 당연했던 기능(고정 IP, 순수 TCP 릴레이)이 선택한 타입에는 아예 없다는 걸 나중에야 알게 됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;새벽 배포 창. 무중단 배포라고 확신하고 오토 스케일링 그룹의 인스턴스를 하나씩 순서대로 내리고 새 버전으로 교체하는 롤링 배포를 돌린다. 배포가 끝난 뒤 모니터링을 보니 배포가 진행되던 구간마다 일부 요청이 500 에러로 실패한 흔적이 남아 있다. 애플리케이션 로그에는 에러가 없고, 헬스체크도 배포 내내 정상이었다. 재현을 시도해도 매번 같은 요청에서 나는 게 아니라 간헐적이라 원인을 좁히기 어렵다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글은 실제 AWS 콘솔 화면이나 CLI 실행 결과를 캡처하지 않습니다. ALB&amp;middot;NLB&amp;middot;CLB가 지원하는 프로토콜, 기본 라우팅 알고리즘, 헬스체크&amp;middot;등록 해제 동작, 교차 영역 분산 기본값, 과금 구조처럼 이 글이 다루는 사실 하나하나는 전부 AWS 공식 문서(Elastic Load Balancing 사용 설명서&amp;middot;기능 비교&amp;middot;가격 페이지)를 직접 열어 원문을 대조한 것입니다. 정확한 가격은 리전과 시점에 따라 바뀌므로, 구체적인 숫자를 쓸 때는 &quot;이 글 작성 시점(2026-08-27) 기준&quot;이라고 밝힙니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;ALB&amp;middot;NLB&amp;middot;CLB가 정확히 뭔가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;온프레미스 대응표&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;실무에서 반드시 알아야 하는 것&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;온프레미스 관리자가 자주 하는 오해&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;비용&amp;middot;운영 감각&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;관련 개념&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s7&quot;&gt;한눈에 정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. ALB&amp;middot;NLB&amp;middot;CLB가 정확히 뭔가&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;ALB&lt;/b&gt;는 요청의 내용(URL 경로, 호스트 헤더 등)을 보고 어디로 보낼지 판단합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;An Application Load Balancer functions at the application layer, the seventh layer of the Open Systems Interconnection (OSI) model.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;OSI(Open Systems Interconnection &amp;mdash; 네트워크 통신을 7개 계층으로 나눠 설명하는 참조 모델) 7계층, 즉 애플리케이션 계층에서 동작한다는 뜻입니다. HTTP 요청 자체를 열어 보고 판단하므로, 경로별&amp;middot;도메인별로 다른 서버 그룹에 보내는 것 같은 콘텐츠 기반 라우팅이 ALB의 핵심입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;NLB&lt;/b&gt;는 요청 내용을 보지 않고 IP&amp;middot;포트 단위로만 분산합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A Network Load Balancer functions at the fourth layer of the Open Systems Interconnection (OSI) model. It can handle millions of requests per second.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;4계층, 즉 전송 계층에서 동작합니다. 애플리케이션 내용을 들여다보지 않는 대신 초저지연&amp;middot;고처리량에 특화돼 있고, 순수 TCP&amp;middot;UDP 트래픽을 그대로 중계하는 데 적합합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;CLB&lt;/b&gt;는 AWS가 가장 먼저 내놓은 로드밸런서로, 지금은 새 워크로드에 쓰라고 권장하지 않는 구세대입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Classic Load Balancers are the previous generation of load balancers from Elastic Load Balancing. We recommend that you migrate to a current generation load balancer.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;CLB 소개 문서 자체에는 계층을 명시한 문장이 없지만, AWS의 공식 기능 비교표는 CLB를 &quot;Layer 4/7&quot;로 분류합니다 &amp;mdash; 4계층 포트 기반 분산과 기본적인 7계층 프로토콜(HTTP/HTTPS) 지원을 한 컴포넌트 안에서 같이 제공했던 구조입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;세 타입 모두 공통으로 갖는 성격이 하나 있습니다 &amp;mdash; 클라이언트 입장에서는 뒤에 서버가 몇 대든 상관없이 하나의 접점으로 보인다는 것입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A load balancer serves as the single point of contact for clients.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 VIP 하나 뒤에 여러 대의 리얼 서버를 숨겼던 것과 같은 감각입니다. AWS의 공식 기능 비교표도 ALB&amp;middot;NLB의 접근 방식을 &quot;Reachable via: VIP&quot;로 표기합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;880&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/3rMPg/dJMcadpJ96Y/koSHYkoSrIketIEDP62IR0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/3rMPg/dJMcadpJ96Y/koSHYkoSrIketIEDP62IR0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/3rMPg/dJMcadpJ96Y/koSHYkoSrIketIEDP62IR0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F3rMPg%2FdJMcadpJ96Y%2FkoSHYkoSrIketIEDP62IR0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;880&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;880&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 온프레미스 대응표&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 물건이 아니라 &quot;가장 가까운 것&quot;입니다.&lt;/b&gt; 온프레미스 어플라이언스 한 대가 하던 일이 AWS에서는 계층별로 나뉘어 있다는 것부터 잡아야 3장&amp;middot;4장이 자연스럽게 이어집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;온프레미스&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;AWS&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;같은 점&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;다른 점&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;L7 스위치의 콘텐츠 기반 라우팅(URL&amp;middot;호스트별 분기)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;경로&amp;middot;호스트 헤더로 다른 서버 그룹에 분배&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고정 IP를 직접 지원하지 않음(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;L4 스위치의 순수 IP&amp;middot;포트 기반 분산&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NLB&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;요청 내용을 안 보고 초저지연 처리&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;UDP까지 처리(3장), 정적&amp;middot;탄력적 IP 지원(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VIP + 헬스 모니터&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;헬스체크(공통)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비정상 대상을 자동으로 제외&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대상이 전부 비정상이면 오히려 전체에 흘려보냄(3장, fail-open)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;퍼시스턴스(세션 고정)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;스티키 세션(공통 개념, ALB&amp;middot;CLB만 지원)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;같은 클라이언트를 같은 서버로 유지&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;쿠키 기반, 소스 IP 기반이 아님(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;통합형 구형 어플라이언스&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;CLB&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;4&amp;middot;7계층 기능을 한 컴포넌트가 같이 제공&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;신규 워크로드 비권장, 순수 TCP/SSL 리스너는 ALB엔 아예 없음(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 실무에서 반드시 알아야 하는 것&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;타입마다 지원하는 프로토콜 자체가 다르다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 기능 비교표에서 이 글이 다루는 세 타입(ALB&amp;middot;NLB&amp;middot;CLB)만 추리면 다음과 같습니다(원문 표에는 게이트웨이 로드밸런서 열도 있지만 이 글의 범위 밖이라 뺐습니다. 원문이 &quot;-&quot;로 비워 둔 칸은 그 항목 자체가 해당 타입에 없다는 뜻이라 괄호로 풀어 썼습니다).&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;ALB&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;NLB&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;CLB&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;계층&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Layer 7&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Layer 4&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Layer 4/7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;타겟 타입&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IP, Instance, Lambda&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IP, Instance, Application Load Balancer&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;(원문 &quot;-&quot;, 개별 타겟 타입 구분 없음)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;프로토콜 리스너&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;HTTP, HTTPS, gRPC&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;TCP, UDP, TLS&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;TCP, SSL/TLS, HTTP, HTTPS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;접근 방식&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VIP&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VIP&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;(원문 &quot;-&quot;, VIP 개념 표기 없음)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;ALB에는 순수 TCP&amp;middot;SSL 리스너 자체가 없습니다.&lt;/b&gt; HTTP/HTTPS/gRPC만 받습니다. 반대로 NLB&amp;middot;CLB는 TCP&amp;middot;TLS(SSL) 리스너를 지원합니다 &amp;mdash; 이 차이가 4장 오해로 이어집니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;스티키 세션은 쿠키 기반이다 &amp;mdash; 소스 IP 퍼시스턴스와는 다르다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스 L4/L7 스위치의 퍼시스턴스는 대부분 클라이언트의 소스 IP를 기준으로 같은 서버에 고정합니다. ALB의 스티키 세션은 다른 방식으로 동작합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;To use sticky sessions, the client must support cookies.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;ALB는 자체 쿠키(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;AWSALB&lt;/code&gt;)를 만들어 클라이언트에게 내려주고, 이후 요청에 그 쿠키가 실려 오는지로 같은 대상을 판단합니다 &amp;mdash; 소스 IP는 보지 않습니다. 이 쿠키의 유효 기간은 7일로 고정돼 있고 바꿀 수 없습니다. 쿠키를 저장하지 않는 클라이언트(일부 API 클라이언트, 헬스체크 스크립트 등)라면 스티키 세션을 켜 놔도 매번 다른 대상으로 흩어집니다 &amp;mdash; 온프레미스에서 소스 IP 기반으로 문제없이 되던 구성이 AWS로 오면서 그대로 안 되는 지점입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;ALB의 라우팅은 규칙(rule) 우선순위로 결정된다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The rules that you define for a listener determine how the load balancer routes requests to its registered targets. Each rule consists of a priority, one or more actions, and one or more conditions. When the conditions for a rule are met, then its actions are performed.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;경로&amp;middot;호스트 헤더 조건을 우선순위 순서로 평가해 맞는 규칙의 액션(어느 타겟 그룹으로 보낼지)을 실행하는 구조입니다. 타겟 그룹 안에서 실제로 어떤 대상에게 요청을 줄지는 별도의 라우팅 알고리즘이 결정합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The default routing algorithm is round robin; alternatively, you can specify the least outstanding requests routing algorithm.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;기본값은 라운드 로빈이고, 요청마다 처리 부하가 들쭉날쭉하면 least outstanding requests(처리 중인 요청이 가장 적은 대상 우선)나 weighted random으로 바꿀 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; L7 스위치로 하던 경로 기반 라우팅을 그대로 옮기려는 시도&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/api&lt;/code&gt;로 오는 요청은 API 서버군으로, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/static&lt;/code&gt;으로 오는 요청은 정적 파일 서버군으로 나누는 규칙을 L7 스위치 하나에 걸어 뒀다고 합시다. AWS로 옮기면서 &quot;로드밸런서니까 아무거나 하나 만들어서 리스너만 두 개 걸면 되겠지&quot; 하고 CLB를 골라 HTTP 리스너 하나 아래 API 서버와 정적 파일 서버를 전부 등록하면, 요청은 경로와 무관하게 등록된 인스턴스 전체에 그냥 순서대로 분산됩니다. CLB에는 애초에 &quot;규칙&quot;이라는 개념 자체가 없어서, 경로를 보고 갈라 보내는 동작을 설정할 방법이 없기 때문입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;정답은 ALB를 쓰고, API 서버용 타겟 그룹과 정적 파일 서버용 타겟 그룹을 각각 만든 뒤, 리스너에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/api/*&lt;/code&gt; 경로 조건은 API 타겟 그룹으로, 나머지는 기본 규칙으로 정적 파일 타겟 그룹으로 보내는 규칙을 우선순위대로 추가하는 것입니다. 온프레미스에서 L7 스위치 화면 하나에 있던 설정이 AWS에서는 &quot;타입 선택(ALB)&quot;과 &quot;리스너 규칙&quot;이라는 두 단계로 나뉘었을 뿐, 할 수 있는 일 자체는 그대로 옮겨집니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;헬스체크가 전부 실패해도 로드밸런서는 트래픽을 끊지 않는다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;However, if the load balancer doesn't have enough healthy targets, it automatically sends traffic to all registered targets (fail open).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;정상 대상이 하나도 없으면 오히려 등록된 대상 전체에 트래픽을 흘려보냅니다(fail-open). 온프레미스 헬스 모니터가 &quot;전부 비정상이면 서비스 자체를 내린다&quot;는 감각으로 설정돼 있었다면 반대 방향의 동작이라 헷갈리기 쉽습니다 &amp;mdash; 이건 아무것도 못 받는 것보다 에러라도 낫다는 설계 판단입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;인스턴스를 등록 해제해도 곧바로 끊기지 않는다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Elastic Load Balancing stops sending requests to targets that are deregistering. By default, Elastic Load Balancing waits 300 seconds before completing the deregistration process, which can help in-flight requests to the target to complete.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;등록 해제를 시작해도 기본 300초 동안은 진행 중이던 요청(in-flight request)이 끝날 시간을 줍니다. 다만 이 유예 시간이 끝나기 전에 대상 쪽에서 먼저 연결을 끊으면 얘기가 달라집니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If a deregistering target terminates the connection before the deregistration delay elapses, the client receives a 500-level error response.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 동작은 4장에서 도입부 시나리오를 그대로 풀어 줍니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;920&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/dukvGj/dJMcacqXZif/hF5q87lXRkubhUZSAZzMA0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/dukvGj/dJMcacqXZif/hF5q87lXRkubhUZSAZzMA0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dukvGj/dJMcacqXZif/hF5q87lXRkubhUZSAZzMA0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdukvGj%2FdJMcacqXZif%2FhF5q87lXRkubhUZSAZzMA0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;920&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;920&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 온프레미스 관리자가 자주 하는 오해&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 1. &quot;로드밸런서니까 당연히 고정 IP 하나로 붙일 수 있겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 로드밸런서에 할당한 VIP가 곧 고정 IP였으니, AWS 로드밸런서도 당연히 고정 IP를 준다고 생각하기 쉽습니다. 하지만 ALB 소개 문서 어디에도 고정 IP 관련 언급이 없는 반면, NLB는 명시적으로 지원합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Elastic Load Balancing creates a network interface for each Availability Zone you enable. Each load balancer node in the Availability Zone uses this network interface to get a static IP address. When you create an Internet-facing load balancer, you can optionally associate one Elastic IP address per subnet.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;파트너사가 방화벽 화이트리스트에 등록할 로드밸런서의 고정 IP를 요구하는데 이미 ALB로 서비스를 구성해 놨다면, ALB 자체를 고정 IP로 바꿀 방법은 없습니다. 이럴 때 흔히 쓰는 구성은 앞단에 NLB를 하나 더 두고 그 뒤에 기존 ALB를 타겟으로 등록하는 것입니다 &amp;mdash; 공식 기능 비교표가 NLB의 타겟 타입에 &quot;Application Load Balancer&quot;를 포함시켜 놓은 것도 이 구성을 염두에 둔 것입니다. 경로 기반 라우팅은 ALB가 그대로 처리하고, 파트너사에 알려 줄 고정 IP는 NLB가 제공하는 식입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 2. &quot;헬스체크만 정상이면 아무 때나 인스턴스를 내려도 안전하다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;도입부 시나리오가 바로 이 오해에서 시작합니다. 오토 스케일링 그룹이 롤링 배포 중 인스턴스를 종료할 때, 헬스체크가 정상이었다는 것과 그 인스턴스가 지금 처리 중인 요청이 없다는 것은 별개입니다. 등록 해제를 시작하면 기본 300초의 유예 시간(3장)이 있지만, 이 시간이 지나기 전에 인스턴스 자체가 연결을 끊어 버리면(운영체제 종료, 프로세스 강제 종료 등) 그 순간 처리 중이던 요청은 500 에러로 클라이언트에 돌아갑니다. 배포 스크립트가 등록 해제 신호를 보내자마자 바로 인스턴스를 종료하도록 짜여 있었다면, 헬스체크 로그는 배포 내내 정상으로 보이면서도 간헐적인 500 에러가 나는 정확히 이 패턴이 재현됩니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;조치는 배포 절차에 등록 해제 유예 시간만큼(또는 그보다 조금 더) 기다리는 단계를 넣는 것입니다. 오토 스케일링의 인스턴스 새로 고침(instance refresh) 기능을 쓴다면 종료 대기(termination wait) 시간을 등록 해제 지연과 맞추고, 직접 스크립트로 내린다면 타겟을 등록 해제한 뒤 그 유예 시간만큼 대기했다가 인스턴스를 종료하도록 순서를 바꿉니다. 당장 급하게 배포를 멈출 수 없는 상황이라면 유예 시간을 늘려 여유를 벌 수도 있지만, 근본적으로는 &quot;등록 해제 신호&quot;와 &quot;인스턴스 종료&quot; 사이에 시간차를 두는 게 맞는 방향입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;880&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/b5llYV/dJMcabyGwvx/aZs3LFnq9GGM7HONvalpYk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/b5llYV/dJMcabyGwvx/aZs3LFnq9GGM7HONvalpYk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/b5llYV/dJMcabyGwvx/aZs3LFnq9GGM7HONvalpYk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fb5llYV%2FdJMcabyGwvx%2FaZs3LFnq9GGM7HONvalpYk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;880&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;880&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 3. &quot;교차 영역 분산 기본값은 셋 다 똑같겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;가용 영역(AZ, Availability Zone &amp;mdash; 물리적으로 분리된 데이터센터 단위)을 여러 개 걸쳐 두면 로드밸런서가 알아서 전체 대상에 고르게 나눠 줄 거라 생각하기 쉽지만, 교차 영역 로드밸런싱(cross-zone load balancing) 기본값은 타입마다 다릅니다. ALB는 끌 수조차 없이 항상 켜져 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;With Application Load Balancers, cross-zone load balancing is always turned on at the load balancer level, and cannot be turned off.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;반면 NLB는 기본값이 꺼짐입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;By default, each load balancer node distributes traffic across the registered targets in its Availability Zone only. If you enable cross-zone load balancing, each load balancer node distributes traffic across the registered targets in all enabled Availability Zones.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;NLB를 쓰면서 한쪽 가용 영역에만 인스턴스를 몰아 뒀다면, 다른 가용 영역의 로드밸런서 노드로 들어온 요청은 그 영역 안의 대상만 찾다가 아예 처리할 곳을 못 찾을 수 있습니다. 가용 영역마다 대상 수를 고르게 맞추거나, 필요하다면 교차 영역 로드밸런싱을 직접 켜야 합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 4. &quot;CLB에서 ALB로 옮기면 기능이 다 그대로 되겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;ALB가 더 최신이니 CLB의 상위 호환일 거라 생각하기 쉽지만, 3장 비교표대로 ALB에는 순수 TCP&amp;middot;SSL 리스너 자체가 없습니다. MQTT 브로커나 커스텀 바이너리 프로토콜을 쓰는 서버, 또는 HTTP가 아닌 TCP 기반 서비스를 CLB 뒤에 두고 있었다면, 그 워크로드는 ALB로 옮길 수 없습니다 &amp;mdash; 이런 경우는 NLB가 맞는 대상입니다. &quot;로드밸런서 교체&quot;를 계획할 때는 지금 CLB가 실제로 어떤 프로토콜의 리스너를 쓰고 있는지부터 확인해야, HTTP/HTTPS 워크로드는 ALB로, 순수 TCP/UDP 워크로드는 NLB로 나눠서 옮길 수 있습니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 비용&amp;middot;운영 감각&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 로드밸런서 어플라이언스를 한 번 사서 설치하면 그 뒤로는 감가상각만 신경 쓰면 되는 자산(CAPEX, Capital Expenditure &amp;mdash; 처음에 사들여 감가상각하는 자본 지출)이었습니다. ELB(Elastic Load Balancing)는 다릅니다 &amp;mdash; 만들어 둔 시간과 처리한 트래픽 양에 따라 계속 청구됩니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;ALB의 과금은 시간당 기본 요금에 LCU(Load Balancer Capacity Unit)라는 처리량 단위 요금을 더하는 구조입니다. 이 글 작성 시점(2026-08-27) us-east-1(버지니아 북부) 리전 기준으로, 시간당 기본 요금은 $0.0225, LCU당 요금은 $0.008입니다. LCU는 한 가지 지표가 아니라 네 가지 차원 중 가장 높은 사용량을 기준으로 계산됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;An LCU measures the dimensions on which the Application Load Balancer processes your traffic (averaged over an hour).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You are charged only on the dimension with the highest usage.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;네 차원은 새 연결 수(초당), 활성 연결 수(분당), 처리 바이트(GB), 그리고 &lt;b&gt;규칙 평가 수(rule evaluations)&lt;/b&gt;입니다. 온프레미스 감각으로는 낯선 항목이 마지막 것입니다 &amp;mdash; 리스너 규칙을 얼마나 복잡하게 짜 두느냐(조건 개수, 트래픽당 평가되는 규칙 수)도 비용에 영향을 줍니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;NLB도 같은 구조로 과금됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;An NLCU measures the dimensions on which the Network Load Balancer processes your traffic (averaged over an hour).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;다만 NLCU당 요금은 $0.006이고, 규칙 평가 차원이 없는 대신 새 연결&amp;middot;활성 연결&amp;middot;처리 바이트 세 차원만 봅니다 &amp;mdash; NLB는 콘텐츠를 보고 규칙을 평가하지 않으니 애초에 이 차원이 존재하지 않는 것입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;트래픽이 없어도 시간당 요금은 그대로 쌓입니다.&lt;/b&gt; 온프레미스 어플라이언스처럼 &quot;안 쓰는 시간엔 그냥 놀고 있는 것&quot;이 아니라, 로드밸런서를 만들어 둔 시간만큼 최소 요금이 계속 붙습니다. 개발&amp;middot;테스트 환경에 만들어 둔 로드밸런서를 쓰지 않는 기간에도 지우지 않으면, 실제 사용량과 무관하게 요금이 쌓입니다. 정확한 숫자는 리전과 시점에 따라 바뀌므로, 실제 도입 전에는 반드시 공식 가격 페이지에서 해당 리전 기준 최신 값을 확인해야 합니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 관련 개념&lt;/h2&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;타겟 그룹&lt;/b&gt; &amp;mdash; 로드밸런서가 실제로 트래픽을 보내는 대상(인스턴스&amp;middot;IP&amp;middot;Lambda) 묶음. 헬스체크&amp;middot;라우팅 알고리즘&amp;middot;등록 해제 지연 같은 설정이 로드밸런서가 아니라 이 단위에 붙는다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Auto Scaling&lt;/b&gt; &amp;mdash; 인스턴스를 자동으로 늘리고 줄이는 서비스. 늘어난 인스턴스는 타겟 그룹에 자동 등록되고, 줄어들 때는 등록 해제 절차(4장)를 거친다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Route 53&lt;/b&gt; &amp;mdash; 도메인 이름을 로드밸런서로 연결하는 DNS 서비스.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS Certificate Manager&lt;/b&gt; &amp;mdash; HTTPS 리스너에 붙일 SSL/TLS 인증서를 발급&amp;middot;관리하는 서비스.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS WAF&lt;/b&gt; &amp;mdash; ALB 앞단에서 요청 내용을 검사해 악성 트래픽을 걸러내는 서비스.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;VPC&amp;middot;보안 그룹&lt;/b&gt; &amp;mdash; 로드밸런서가 어느 서브넷에 놓이고 어떤 트래픽을 받을 수 있는지를 결정하는 네트워크 경계.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;7. 한눈에 정리&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;확인할 것&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;계층&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB=7계층(내용 기반 라우팅), NLB=4계층(IP&amp;middot;포트만), CLB=4/7계층(구세대, 신규 비권장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;프로토콜&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB는 HTTP/HTTPS/gRPC만, NLB는 TCP/UDP/TLS, CLB는 TCP/SSL/HTTP/HTTPS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고정 IP&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NLB만 정적&amp;middot;탄력적 IP 지원, ALB엔 없음 &amp;mdash; 필요하면 앞단에 NLB를 둔다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;라우팅&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB는 리스너 규칙(우선순위&amp;middot;조건)으로 분기, CLB엔 이 개념 자체가 없음&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본 알고리즘&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;라운드 로빈(least outstanding requests&amp;middot;weighted random으로 변경 가능)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;헬스체크 실패&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대상 전부 비정상이면 오히려 전체에 흘려보냄(fail-open)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;등록 해제&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본 300초 유예, 그 전에 연결이 끊기면 클라이언트에 500 에러&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;교차 영역 분산&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB는 항상 켜짐(끌 수 없음), NLB는 기본 꺼짐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비용&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;시간당 기본 요금 + LCU/NLCU(차원 중 최댓값 기준), 트래픽 없어도 시간당 요금은 그대로&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;CLB&amp;rarr;ALB 이전&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;순수 TCP/SSL 워크로드는 ALB로 못 옮김 &amp;mdash; NLB가 맞는 대상&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/dig-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-DNS%EB%8A%94-%EC%83%88-%EC%84%9C%EB%B2%84%EB%A5%BC-%EA%B0%80%EB%A6%AC%ED%82%A4%EB%8A%94%EB%8D%B0-%EC%A0%91%EC%86%8D%EC%9D%80-%EC%98%9B%EB%82%A0-%EA%B3%B3%EC%9C%BC%EB%A1%9C-%EA%B0%91%EB%8B%88%EB%8B%A4&quot;&gt;실제로 어떤 레코드가 응답하는지 확인하는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/VPC-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EC%82%AC%EB%82%B4%EB%A7%9D-%EC%84%A4%EA%B3%84-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B0%80%EC%83%81-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC&quot;&gt;네트워크 안에서 이름을 푸는 구조&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/ALB%C2%B7NLB%C2%B7CLB-%E2%80%94-L4L7-%EC%8A%A4%EC%9C%84%EC%B9%98-%ED%95%9C-%EB%8C%80%EA%B0%80-%EC%84%B8-%EA%B0%88%EB%9E%98%EB%A1%9C-%EB%82%98%EB%89%9C-%EC%9D%B4%EC%9C%A0&quot;&gt;로드밸런서를 가리키는 레코드 만들기&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/NAT-%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4%C2%B7%EC%9D%B8%ED%84%B0%EB%84%B7-%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EA%B2%BD%EA%B3%84-%EB%9D%BC%EC%9A%B0%ED%84%B0-%ED%95%98%EB%82%98%EA%B0%80-%EB%91%98%EB%A1%9C-%EA%B0%88%EB%9D%BC%EC%A7%84-%EC%9D%B4%EC%9C%A0&quot;&gt;밖으로 나가는 경로는 또 다른 이야기입니다&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>AWS/이게 뭐야?</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/89</guid>
      <comments>https://wowpanel.tistory.com/entry/Route-53-%E2%80%94-DNS-%EC%84%9C%EB%B2%84-%ED%95%98%EB%82%98%EA%B0%80-%ED%95%98%EB%8D%98-%EC%9D%BC%EC%9D%84-%EC%84%B8-%EA%B0%88%EB%9E%98%EB%A1%9C-%EB%82%98%EB%88%88-%EC%9D%B4%EC%9C%A0#entry89comment</comments>
      <pubDate>Thu, 3 Sep 2026 16:16:27 +0900</pubDate>
    </item>
    <item>
      <title>리눅스 압축&amp;middot;백업 Top 10 &amp;mdash; tar&amp;middot;rsync&amp;middot;scp, 변수만 바꿔 그대로 쓰는 명령</title>
      <link>https://wowpanel.tistory.com/entry/%EB%A6%AC%EB%88%85%EC%8A%A4-%EC%95%95%EC%B6%95%C2%B7%EB%B0%B1%EC%97%85-Top-10-%E2%80%94-tar%C2%B7rsync%C2%B7scp-%EB%B3%80%EC%88%98%EB%A7%8C-%EB%B0%94%EA%BF%94-%EA%B7%B8%EB%8C%80%EB%A1%9C-%EC%93%B0%EB%8A%94-%EB%AA%85%EB%A0%B9</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;배포 전에, 장애 조치 전에, &quot;혹시 몰라서&quot; 백업 하나는 남겨 두고 시작합니다. 그런데 막상 치려면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tar&lt;/code&gt; 옵션이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;czf&lt;/code&gt;였는지 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;xzf&lt;/code&gt;였는지 헷갈리고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rsync&lt;/code&gt;는 옵션 하나 잘못 쓰면 있던 파일을 지워 버릴 수도 있다는 얘기를 들어서 손이 안 갑니다. 이 글은 &lt;b&gt;압축을 만들고, 옮기기 전에 확인하고, 옮긴 뒤 검증까지&lt;/b&gt; 이어지는 명령 10개를 모았습니다. 변수 하나만 바꿔 그대로 복붙하면 됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;배포 스크립트를 돌리기 직전입니다.&lt;/b&gt; 실패하면 되돌릴 수 있어야 하니 지금 상태를 먼저 압축해 남기고, 다른 서버로도 하나 복사해 두려 합니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tar&lt;/code&gt;로 뭘 묶어야 하는지, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rsync&lt;/code&gt;와 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;scp&lt;/code&gt; 중 뭘 써야 하는지, 그리고 무엇보다 &amp;mdash; &lt;b&gt;백업이라고 만들어 놓은 게 실제로 쓸 수 있는 파일인지&lt;/b&gt; 어떻게 확인하는지가 필요합니다.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;이 글 쓰는 법 &amp;mdash; 변수 한 줄만 바꾸세요&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;변수가 있는 명령은 아래 형태입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SRC=app # &amp;larr; 이 줄의 값만 여러분이 압축할 디렉터리로 바꾸세요&lt;br /&gt;tar -czf app-backup.tar.gz &quot;$SRC&quot; # &amp;larr; 압축 아카이브 생성&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;첫 줄의 오른쪽 값만 바꾸고 그대로 붙여넣으면 됩니다.&lt;/b&gt; 출력은 전부 실제 서버(Rocky Linux 9)에서 실행해 그대로 옮겼습니다 &amp;mdash; 여러분 서버의 파일 크기&amp;middot;경로&amp;middot;타임스탬프는 다르게 나오는 게 정상입니다. 데모는 홈 디렉터리 밑에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app/&lt;/code&gt;이라는 예제 디렉터리(로그 파일 2개 + 설정 파일 1개, 약 400K)를 직접 만들어 놓고 그 안에서 진행했습니다 &amp;mdash; 여러분은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SRC=&lt;/code&gt;에 실제 백업 대상 경로를 넣으면 됩니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;scp&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rsync&lt;/code&gt; 예시는 &lt;b&gt;같은 서버 안 두 디렉터리 사이&lt;/b&gt; 복사로 검증했습니다 &amp;mdash; 진짜 원격 서버로 보낼 때 목적지를 어떻게 바꾸는지는 각 항목 주의에 적었습니다. 아래 10개는 전부 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sudo&lt;/code&gt; 없이, 이 계정이 쓰기 권한을 가진 경로 안에서만 동작합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;측정 환경: Rocky Linux 9.7(커널 5.14.0-611.47.1.el9_7) &amp;middot; GNU tar 1.34 &amp;middot; rsync 3.2.5(프로토콜 31) &amp;middot; OpenSSH 8.7p1(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;scp&lt;/code&gt;) &amp;middot; gzip 1.12 &amp;middot; GNU coreutils 8.32(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;du&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;find&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ls&lt;/code&gt;).&lt;/blockquote&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;아카이브 만들기&amp;middot;확인 &amp;mdash; tar&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;옮기기 전에, 옮긴 뒤에 확인하기 &amp;mdash; rsync&amp;middot;scp&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;백업이 맞는지 검증하기&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;전체 치트시트&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. 아카이브 만들기&amp;middot;확인 &amp;mdash; tar&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;1) 디렉터리를 압축 아카이브로 묶기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 배포&amp;middot;설정 변경 전에 지금 상태를 통째로 하나의 파일로 남길 때. 가장 먼저 쓰게 되는 명령입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SRC=app # &amp;larr; 압축할 디렉터리&lt;br /&gt;tar -czf app-backup.tar.gz &quot;$SRC&quot; # &amp;larr; c=생성, z=gzip 압축, f=파일명 지정&lt;br /&gt;ls -lh app-backup.tar.gz&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SRC=app&lt;br /&gt;$ tar -czf app-backup.tar.gz &quot;$SRC&quot;&lt;br /&gt;$ ls -lh app-backup.tar.gz&lt;br /&gt;-rw-r--r--. 1 wowpanel wowpanel 6.0K&amp;nbsp;&amp;nbsp;8월 25 16:07 app-backup.tar.gz&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 원본은 그대로 남습니다(압축이지 이동이 아닙니다). &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-czf&lt;/code&gt;의 순서는 관례일 뿐 실제로는 옵션 나열이라 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-zcf&lt;/code&gt;도 되지만, &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;f&lt;/code&gt; 다음에는 항상 파일명이 와야 합니다&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app&lt;/code&gt;과 아카이브 이름의 순서를 바꿔 쓰면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app&lt;/code&gt;이라는 이름의 아카이브가 생기고 진짜 대상이 뒤로 밀립니다. 상대 경로로 압축했으므로(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&quot;$SRC&quot;&lt;/code&gt;가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app&lt;/code&gt;) 압축을 풀면 항상 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app/&lt;/code&gt; 아래에 풀립니다 &amp;mdash; 절대경로(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/home/사용자/app&lt;/code&gt;)로 압축하면 풀 때도 그 절대경로 그대로 생성되어 다른 계정에서 되돌리기 번거로워집니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;2) 압축 풀지 않고 내용만 미리 보기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 남이 만들어 둔 백업이거나, 오래전에 만든 걸 열기 전에 &quot;이 안에 뭐가 들었는지&quot;부터 확인할 때.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;ARCHIVE=app-backup.tar.gz # &amp;larr; 확인할 아카이브&lt;br /&gt;tar -tzf &quot;$ARCHIVE&quot; # &amp;larr; t=목록만, 실제로 풀지 않음&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ ARCHIVE=app-backup.tar.gz&lt;br /&gt;$ tar -tzf &quot;$ARCHIVE&quot;&lt;br /&gt;app/&lt;br /&gt;app/logs/&lt;br /&gt;app/logs/app.log&lt;br /&gt;app/logs/access.log&lt;br /&gt;app/config/&lt;br /&gt;app/config/app.yml&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용, 디스크에 아무것도 쓰지 않습니다. 대상 서버에 이 아카이브를 풀 자리가 있는지 확인하기 전에, 먼저 이걸로 &quot;무엇이 얼마나 들었는지&quot;부터 보는 게 순서입니다. 아카이브가 손상됐으면 이 명령에서 먼저 걸립니다 &amp;mdash; 3)번 넘어가기 전에 습관적으로 한 번 돌려 보세요(10번에서 손상 사례를 직접 보여 드립니다).&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;3) 아카이브에서 파일 하나만 꺼내기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 전체를 되돌릴 필요는 없고, 그때 그 설정 파일 하나만 다시 보고 싶을 때. 전체를 풀었다가 필요한 것만 골라내는 것보다 빠릅니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;ARCHIVE=app-backup.tar.gz # &amp;larr; 대상 아카이브&lt;br /&gt;FILE=app/config/app.yml # &amp;larr; 2)번 목록에서 확인한, 꺼낼 파일의 전체 경로&lt;br /&gt;mkdir -p restore-test&lt;br /&gt;tar -xzf &quot;$ARCHIVE&quot; -C restore-test &quot;$FILE&quot; # &amp;larr; restore-test/ 밑에 그 파일 하나만 풀림&lt;br /&gt;find restore-test -type f&lt;br /&gt;cat restore-test/app/config/app.yml&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ ARCHIVE=app-backup.tar.gz&lt;br /&gt;$ FILE=app/config/app.yml&lt;br /&gt;$ mkdir -p restore-test&lt;br /&gt;$ tar -xzf &quot;$ARCHIVE&quot; -C restore-test &quot;$FILE&quot;&lt;br /&gt;$ find restore-test -type f&lt;br /&gt;restore-test/app/config/app.yml&lt;br /&gt;$ cat restore-test/app/config/app.yml&lt;br /&gt;name: demo-app&lt;br /&gt;port: 8080&lt;br /&gt;env: production&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;FILE=&lt;/code&gt;은 2)번 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tar -tzf&lt;/code&gt; 출력에 찍힌 경로를 &lt;b&gt;글자 그대로&lt;/b&gt; 써야 합니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app/config/app.yml&lt;/code&gt;을 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;config/app.yml&lt;/code&gt;처럼 앞부분을 빼고 쓰면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tar: config/app.yml: 아카이브에 없음&lt;/code&gt;이 납니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-C restore-test&lt;/code&gt;는 &quot;여기로 옮겨서 풀어라&quot;는 뜻이라 원래 있던 자리를 건드리지 않습니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-C&lt;/code&gt; 없이 그냥 풀면 지금 디렉터리에 바로 풀리므로, 같은 이름의 파일이 이미 있으면 &lt;b&gt;확인 없이 덮어씁니다&lt;/b&gt;.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;4) 압축이 실제로 얼마나 줄었는지 확인&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 백업 용량 계획을 세울 때, &quot;이 정도 압축이면 디스크가 며칠 버티나&quot;를 가늠할 때.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SRC=app # &amp;larr; 원본 디렉터리&lt;br /&gt;ARCHIVE=app-backup.tar.gz # &amp;larr; 압축 결과물&lt;br /&gt;du -sh &quot;$SRC&quot; &quot;$ARCHIVE&quot;&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SRC=app&lt;br /&gt;$ ARCHIVE=app-backup.tar.gz&lt;br /&gt;$ du -sh &quot;$SRC&quot; &quot;$ARCHIVE&quot;&lt;br /&gt;400K app&lt;br /&gt;8.0K app-backup.tar.gz&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. 1)번 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ls -lh&lt;/code&gt;에서 본 아카이브 크기(6.0K)와 여기 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;du -sh&lt;/code&gt; 값(8.0K)이 다른 게 정상입니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ls&lt;/code&gt;는 파일의 실제 바이트 수를, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;du&lt;/code&gt;는 파일시스템 블록 단위로 올림한 디스크 사용량을 보여주기 때문입니다. 이 예제는 반복되는 텍스트 로그라 50배 가까이 줄었지만, &lt;b&gt;이미 압축된 파일(jpg&amp;middot;mp4&amp;middot;이미 gzip된 로그)은 다시 압축해도 거의 안 줄고 시간만 씁니다.&lt;/b&gt; 원본 디렉터리에 그런 파일이 섞여 있다면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;du -sh&lt;/code&gt; 전후 차이가 기대만큼 안 나온다고 놀라지 마세요 &amp;mdash; 텍스트 위주(로그&amp;middot;설정&amp;middot;소스)일 때 이 비율이 의미가 있습니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 옮기기 전에, 옮긴 뒤에 확인하기 &amp;mdash; rsync&amp;middot;scp&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;5) rsync로 무엇이 바뀔지 먼저 보기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 실제로 옮기기 전에, 뭐가 새로 추가되고 뭐가 덮어써질지 미리 확인할 때. 대상 디렉터리에 이미 파일이 있다면 건너뛰지 마세요.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SRC=app/ # &amp;larr; 끝에 슬래시: app &quot;안의 내용&quot;을 보냄&lt;br /&gt;DEST=backup-stage/app/ # &amp;larr; 목적지&lt;br /&gt;rsync -avn &quot;$SRC&quot; &quot;$DEST&quot; # &amp;larr; n=dry-run, 실제로는 아무것도 안 씀&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SRC=app/&lt;br /&gt;$ DEST=backup-stage/app/&lt;br /&gt;$ rsync -avn &quot;$SRC&quot; &quot;$DEST&quot;&lt;br /&gt;sending incremental file list&lt;br /&gt;created directory backup-stage/app&lt;br /&gt;./&lt;br /&gt;config/&lt;br /&gt;config/app.yml&lt;br /&gt;logs/&lt;br /&gt;logs/access.log&lt;br /&gt;logs/app.log&lt;br /&gt;&lt;br /&gt;sent 196 bytes&amp;nbsp;&amp;nbsp;received 75 bytes&amp;nbsp;&amp;nbsp;542.00 bytes/sec&lt;br /&gt;total size is 399,545&amp;nbsp;&amp;nbsp;speedup is 1,474.34 (DRY RUN)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-n&lt;/code&gt;(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--dry-run&lt;/code&gt;)이 걸려 있으면 &lt;b&gt;실제로는 디렉터리조차 만들지 않습니다.&lt;/b&gt; 이 실행 직후 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ls backup-stage&lt;/code&gt;를 해 보면 여전히 없습니다 &amp;mdash; 출력에 찍힌 &quot;created directory&quot;는 &quot;만들었다&quot;가 아니라 &quot;만들 것이다&quot;라는 뜻이라, 처음 보면 착각하기 쉽습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SRC&lt;/code&gt; 끝의 슬래시(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app/&lt;/code&gt;)는 &quot;app 디렉터리 자체가 아니라 그 안의 내용을 보낸다&quot;는 뜻입니다 &amp;mdash; 슬래시를 빼고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app&lt;/code&gt;이라고만 쓰면 목적지 밑에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app&lt;/code&gt;이 한 겹 더 들어가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app/app/&lt;/code&gt; 구조가 됩니다. 처음 옮기는 대상이라면 이 명령으로 목록부터 확인하고 6)으로 넘어가세요.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;6) rsync로 실제 동기화하기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 5)에서 확인한 내용이 맞으면 실제로 옮깁니다. 두 번째부터는 전체를 다시 보내지 않고 &lt;b&gt;바뀐 것만&lt;/b&gt; 보냅니다(7번에서 확인).&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SRC=app/ # &amp;larr; 보낼 디렉터리(끝 슬래시 유지)&lt;br /&gt;DEST=backup-stage/app/ # &amp;larr; 목적지&lt;br /&gt;rsync -av &quot;$SRC&quot; &quot;$DEST&quot; # &amp;larr; a=권한&amp;middot;시각 등 보존, v=상세 출력&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;먼저 목적지 상위 디렉터리 없이 그대로 돌리면 이렇게 실패합니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rsync&lt;/code&gt;는 목적지의 &lt;b&gt;마지막 한 단계&lt;/b&gt;만 새로 만들고, 그 위 경로까지 통째로 만들어 주지는 않습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ rsync -av app/ backup-stage/app/&lt;br /&gt;sending incremental file list&lt;br /&gt;&lt;br /&gt;rsync: [Receiver] mkdir &quot;/home/wowpanel/blogdemo/backup-stage/app&quot; failed: No such file or directory (2)&lt;br /&gt;rsync error: error in file IO (code 11) at main.c(780) [Receiver=3.2.5]&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;상위 디렉터리를 먼저 만들어 주면 됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;mkdir -p backup-stage # &amp;larr; 목적지의 상위 디렉터리를 먼저 확보&lt;br /&gt;SRC=app/&lt;br /&gt;DEST=backup-stage/app/&lt;br /&gt;rsync -av &quot;$SRC&quot; &quot;$DEST&quot;&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ mkdir -p backup-stage&lt;br /&gt;$ SRC=app/&lt;br /&gt;$ DEST=backup-stage/app/&lt;br /&gt;$ rsync -av &quot;$SRC&quot; &quot;$DEST&quot;&lt;br /&gt;sending incremental file list&lt;br /&gt;created directory backup-stage/app&lt;br /&gt;./&lt;br /&gt;config/&lt;br /&gt;config/app.yml&lt;br /&gt;logs/&lt;br /&gt;logs/access.log&lt;br /&gt;logs/app.log&lt;br /&gt;&lt;br /&gt;sent 399,957 bytes&amp;nbsp;&amp;nbsp;received 131 bytes&amp;nbsp;&amp;nbsp;800,176.00 bytes/sec&lt;br /&gt;total size is 399,545&amp;nbsp;&amp;nbsp;speedup is 1.00&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mkdir -p backup-stage&lt;/code&gt;처럼 &lt;b&gt;목적지의 상위 경로까지는 미리 만들어 둬야&lt;/b&gt; 합니다(마지막 한 단계인 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;app&lt;/code&gt;만 rsync가 알아서 만듭니다). 원격 서버로 보낼 때는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;DEST&lt;/code&gt; 자리를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;user@호스트:경로&lt;/code&gt; 형태로 바꾸면 됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;DEST=wowpanel@백업서버:/home/wowpanel/backup-stage/app/ # &amp;larr; 목적지를 원격 표기로&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글의 예시는 검증 서버 안에서 로컬 경로끼리 확인했습니다. &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--delete&lt;/code&gt; 옵션은 이 명령에 없습니다&lt;/b&gt; &amp;mdash; 넣으면 목적지에는 있는데 원본에는 없는 파일을 지웁니다. 백업 스테이징처럼 &quot;쌓아 두는&quot; 용도라면 빼는 쪽이 안전하고, 목적지를 원본과 완전히 똑같이 맞추고 싶을 때만(그리고 그 위험을 알고) 붙이세요.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;7) 다시 돌리면 바뀐 파일만 보낸다는 것 확인&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 같은 목적지에 반복해서 백업을 돌릴 때, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rsync&lt;/code&gt;가 정말 전체를 다시 보내지 않는지 눈으로 확인합니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;scp&lt;/code&gt;로 매번 통째로 복사하는 것과 가장 크게 갈리는 지점입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;echo &quot;app restarted at $(date +%H:%M:%S)&quot; &amp;gt;&amp;gt; app/logs/app.log # &amp;larr; 파일 하나만 변경&lt;br /&gt;SRC=app/&lt;br /&gt;DEST=backup-stage/app/&lt;br /&gt;rsync -av &quot;$SRC&quot; &quot;$DEST&quot;&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ echo &quot;app restarted at $(date +%H:%M:%S)&quot; &amp;gt;&amp;gt; app/logs/app.log&lt;br /&gt;$ SRC=app/&lt;br /&gt;$ DEST=backup-stage/app/&lt;br /&gt;$ rsync -av &quot;$SRC&quot; &quot;$DEST&quot;&lt;br /&gt;sending incremental file list&lt;br /&gt;logs/app.log&lt;br /&gt;&lt;br /&gt;sent 1,958 bytes&amp;nbsp;&amp;nbsp;received 37 bytes&amp;nbsp;&amp;nbsp;3,990.00 bytes/sec&lt;br /&gt;total size is 399,571&amp;nbsp;&amp;nbsp;speedup is 200.29&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용에 가깝습니다(목적지만 갱신, 원본은 그대로). 목록에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;logs/app.log&lt;/code&gt; 딱 하나만 뜬 걸 보세요 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;access.log&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;config/app.yml&lt;/code&gt;은 안 바뀌었으니 건드리지 않았습니다. 이게 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rsync&lt;/code&gt;를 반복 백업에 쓰는 이유입니다: 매번 전체를 보내는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;scp -r&lt;/code&gt;와 달리, 바뀐 부분만(그것도 파일 안에서 바뀐 블록만) 전송합니다. 다만 이 판단은 &lt;b&gt;파일 크기와 수정 시각(mtime)&lt;/b&gt; 을 기준으로 하므로, 내용은 같은데 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;touch&lt;/code&gt;로 시각만 건드려도 &quot;바뀐 파일&quot;로 잡혀 다시 전송됩니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;8) 파일 하나만 빠르게 복사 &amp;mdash; scp&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 디렉터리 전체 동기화가 아니라, 파일 딱 하나를 지금 바로 다른 곳에 보낼 때. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rsync&lt;/code&gt;보다 명령이 짧고 옵션을 고민할 게 적습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;FILE=app/config/app.yml # &amp;larr; 보낼 파일&lt;br /&gt;DEST=backup-stage/app.yml.bak # &amp;larr; 목적지 경로(원격이면 user@호스트:경로)&lt;br /&gt;scp &quot;$FILE&quot; &quot;$DEST&quot;&lt;br /&gt;ls -la backup-stage/app.yml.bak&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ FILE=app/config/app.yml&lt;br /&gt;$ DEST=backup-stage/app.yml.bak&lt;br /&gt;$ scp &quot;$FILE&quot; &quot;$DEST&quot;&lt;br /&gt;$ ls -la backup-stage/app.yml.bak&lt;br /&gt;-rw-r--r--. 1 wowpanel wowpanel 42&amp;nbsp;&amp;nbsp;8월 25 16:08 backup-stage/app.yml.bak&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 성공하면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;scp&lt;/code&gt;는 아무 말도 안 합니다(진행률 표시가 꺼진 비대화형 실행이라 조용합니다) &amp;mdash; 위처럼 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ls&lt;/code&gt;로 결과를 직접 확인하는 습관을 들이세요. 진짜 원격 서버로 보낼 때는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;DEST&lt;/code&gt;를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;user@호스트:경로&lt;/code&gt; 형태로 바꿉니다(포트가 22가 아니면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-P&lt;/code&gt;로 지정).&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;scp -P 2222 &quot;$FILE&quot; wowpanel@백업서버:~/backup/ # &amp;larr; 원격으로 보낼 때 형태&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;디렉터리째 보내려면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-r&lt;/code&gt;을 붙여야 합니다 &amp;mdash; 안 붙이면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;cp: -r not specified; omitting directory 'app'&lt;/code&gt; 한 줄만 남기고 아무것도 안 보냅니다. &lt;b&gt;여러 파일을 반복해서 보낼 거라면 6)의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rsync&lt;/code&gt;가 낫습니다&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;scp&lt;/code&gt;는 매번 전체를 새로 복사해서, 7)에서 본 것 같은 &quot;바뀐 것만&quot; 절약이 없습니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 백업이 맞는지 검증하기&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;9) 백업이 방금 실제로 만들어졌는지 확인&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 백업 스크립트가 크론으로 도는데, &quot;어젯밤에 진짜 돌긴 했나&quot;를 확인할 때. 스크립트가 에러 없이 끝났다는 것과 파일이 실제로 갱신됐다는 것은 다른 얘기입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;DIR=backup-stage # &amp;larr; 백업이 쌓이는 디렉터리&lt;br /&gt;find &quot;$DIR&quot; -type f -newermt &quot;10 minutes ago&quot; # &amp;larr; 최근 10분 안에 바뀐 파일만&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ DIR=backup-stage&lt;br /&gt;$ find &quot;$DIR&quot; -type f -newermt &quot;10 minutes ago&quot;&lt;br /&gt;backup-stage/app/config/app.yml&lt;br /&gt;backup-stage/app/logs/access.log&lt;br /&gt;backup-stage/app/logs/app.log&lt;br /&gt;backup-stage/app.yml.bak&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-newermt&lt;/code&gt;(modification time 기준)는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&quot;10 minutes ago&quot;&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&quot;yesterday&quot;&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&quot;2026-08-25 09:00:00&quot;&lt;/code&gt;처럼 자연어와 정확한 시각을 둘 다 받습니다. 이 명령이 &lt;b&gt;빈 결과&lt;/b&gt;를 내면 &amp;mdash; 크론 로그에는 &quot;성공&quot;이라고 찍혀 있어도 &amp;mdash; 실제로는 최근에 아무 파일도 안 바뀐 것이니 스크립트가 조용히 아무 일도 안 하고 끝났다는 신호입니다. 반대로 파일이 있다고 해서 내용까지 맞다는 보장은 없습니다 &amp;mdash; 그건 10)에서 봅니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;10) 압축 파일이 안 깨졌는지 무결성 확인&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 백업을 실제로 써야 하는 순간(복구할 때)이 오기 &lt;b&gt;전에&lt;/b&gt; 미리 확인해 둘 때. 복구 시점에 처음 알면 이미 늦습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;ARCHIVE=app-backup.tar.gz&lt;br /&gt;tar -tzf &quot;$ARCHIVE&quot; &amp;gt; /dev/null; echo &quot;rc=$?&quot; # &amp;larr; 목록을 끝까지 읽어 보되 화면엔 안 찍음&lt;br /&gt;gzip -t &quot;$ARCHIVE&quot;; echo &quot;rc=$?&quot; # &amp;larr; gzip 계층만 별도로 검사&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ ARCHIVE=app-backup.tar.gz&lt;br /&gt;$ tar -tzf &quot;$ARCHIVE&quot; &amp;gt; /dev/null; echo &quot;rc=$?&quot;&lt;br /&gt;rc=0&lt;br /&gt;$ gzip -t &quot;$ARCHIVE&quot;; echo &quot;rc=$?&quot;&lt;br /&gt;rc=0&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;두 rc가 모두 0이면 정상입니다. 손상된 아카이브라면 이렇게 됩니다 &amp;mdash; 앞부분만 잘려 나간 파일로 재현했습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ head -c 4000 app-backup.tar.gz &amp;gt; broken.tar.gz&lt;br /&gt;$ tar -tzf broken.tar.gz &amp;gt; /dev/null; echo &quot;rc=$?&quot;&lt;br /&gt;gzip: stdin: unexpected end of file&lt;br /&gt;tar: 아카이브에 예기치 않은 파일 끝 문자&lt;br /&gt;tar: Error is not recoverable: exiting now&lt;br /&gt;rc=2&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-tzf &amp;gt; /dev/null&lt;/code&gt;은 화면에 목록을 안 찍을 뿐, tar가 아카이브를 &lt;b&gt;끝까지 실제로 읽습니다&lt;/b&gt; &amp;mdash; 그래서 중간이 잘린 파일도 걸러냅니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ls -lh&lt;/code&gt;로 크기가 그럴듯해 보여도 전송 도중 끊긴 파일은 크기만 크고 내용이 없을 수 있습니다 &amp;mdash; 크기 확인(4번)과 이 무결성 확인은 서로 다른 걸 봅니다, 크기가 맞아도 이 검사는 따로 돌리세요. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rc=$?&lt;/code&gt;는 반드시 &lt;b&gt;명령 바로 뒤에 세미콜론으로 붙여야&lt;/b&gt; 합니다 &amp;mdash; 줄을 나눠 따로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;echo &quot;rc=$?&quot;&lt;/code&gt;를 치면 그사이 프롬프트가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;$?&lt;/code&gt;를 갈아치워 늘 0으로 보일 수 있습니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 전체 치트시트&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;한 번에 모아 둡니다. 변수(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SRC&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;DEST&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ARCHIVE&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;FILE&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;DIR&lt;/code&gt;)만 바꿔서 그대로 쓰세요.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;# ── 아카이브 만들기&amp;middot;확인&lt;br /&gt;SRC=app; tar -czf app-backup.tar.gz &quot;$SRC&quot; # &amp;larr; 압축 만들기&lt;br /&gt;ARCHIVE=app-backup.tar.gz; tar -tzf &quot;$ARCHIVE&quot; # &amp;larr; 내용만 미리 보기&lt;br /&gt;ARCHIVE=app-backup.tar.gz; FILE=app/config/app.yml; mkdir -p restore-test; tar -xzf &quot;$ARCHIVE&quot; -C restore-test &quot;$FILE&quot; # &amp;larr; 파일 하나만 꺼내기&lt;br /&gt;SRC=app; ARCHIVE=app-backup.tar.gz; du -sh &quot;$SRC&quot; &quot;$ARCHIVE&quot; # &amp;larr; 압축률 확인&lt;br /&gt;&lt;br /&gt;# ── 옮기기 전에, 옮긴 뒤에 확인하기&lt;br /&gt;SRC=app/; DEST=backup-stage/app/; rsync -avn &quot;$SRC&quot; &quot;$DEST&quot; # &amp;larr; 무엇이 바뀔지 미리 보기(dry-run)&lt;br /&gt;mkdir -p backup-stage; SRC=app/; DEST=backup-stage/app/; rsync -av &quot;$SRC&quot; &quot;$DEST&quot; # &amp;larr; 실제 동기화&lt;br /&gt;SRC=app/; DEST=backup-stage/app/; rsync -av &quot;$SRC&quot; &quot;$DEST&quot; # &amp;larr; 재실행 시 바뀐 것만 전송 확인&lt;br /&gt;FILE=app/config/app.yml; DEST=backup-stage/app.yml.bak; scp &quot;$FILE&quot; &quot;$DEST&quot; # &amp;larr; 파일 하나만 빠르게&lt;br /&gt;&lt;br /&gt;# ── 백업이 맞는지 검증하기&lt;br /&gt;DIR=backup-stage; find &quot;$DIR&quot; -type f -newermt &quot;10 minutes ago&quot; # &amp;larr; 방금 만들어졌는지&lt;br /&gt;ARCHIVE=app-backup.tar.gz; tar -tzf &quot;$ARCHIVE&quot; &amp;gt; /dev/null; echo &quot;rc=$?&quot; # &amp;larr; 안 깨졌는지(tar 계층)&lt;br /&gt;ARCHIVE=app-backup.tar.gz; gzip -t &quot;$ARCHIVE&quot;; echo &quot;rc=$?&quot; # &amp;larr; 안 깨졌는지(gzip 계층)&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #dc2626; background: #fef2f2 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;소유권까지 그대로 보존해서 백업&amp;middot;복원하려면&lt;/b&gt; &amp;mdash; 위 10개는 전부 이 계정 권한만으로 됩니다. 그런데 여러 계정이 쓰던 파일을 백업했다가 그대로 복원하려면(소유자&amp;middot;그룹까지 원본과 똑같이) root 권한이 필요합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;# 백업할 때 소유권 정보까지 아카이브에 남기는 것 자체는 이미 기본 동작입니다.&lt;br /&gt;# 문제는 &quot;복원할 때 그 소유권을 실제로 적용&quot;하는 단계입니다 &amp;mdash; 아래는 root로 실행해야 하는 형태입니다.&lt;br /&gt;ARCHIVE=app-backup.tar.gz&lt;br /&gt;tar -xzpf &quot;$ARCHIVE&quot; --same-owner -C /restore/target # &amp;larr; p=권한 보존, --same-owner=소유자&amp;middot;그룹까지 원본대로&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tar&lt;/code&gt;는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--same-owner&lt;/code&gt;를 이렇게 설명합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Try extracting files with the same ownership as exists in the archive (default for superuser).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;일반 계정으로 복원하면 파일들은 전부 실행한 계정 소유로 바뀝니다(권한 부족을 알아서 조용히 우회). &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rsync&lt;/code&gt;도 마찬가지입니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man rsync&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--owner&lt;/code&gt; 설명입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;This option causes rsync to set the owner of the destination file to be the same as the source file, but only if the receiving rsync is being run as the super-user (see also the --super and --fake-super options).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 명령은 root 권한이 필요해서 &lt;b&gt;이 글에서는 실행&amp;middot;검증하지 않았습니다&lt;/b&gt; &amp;mdash; 이 프로젝트는 검증 안 된 출력을 싣지 않는 걸 원칙으로 하고, 운영 서버에서 sudo도 쓰지 않습니다. 실행하기 전에 반드시:&lt;/p&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;복원 대상 경로(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/restore/target&lt;/code&gt;)에 같은 이름의 파일이 이미 있는지 먼저 확인하세요 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--same-owner&lt;/code&gt;는 소유권만 바꿀 뿐 덮어쓰기 확인은 별도입니다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;되돌릴 방법(스냅샷, 혹은 복원 전 상태의 별도 백업)을 먼저 확보하세요.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;마무리&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;순서대로 쓰면 됩니다 &amp;mdash; 압축부터 만들고(1), 옮기기 전에 뭐가 들었는지 확인하고(2), 필요하면 파일 하나만 골라 꺼내고(3), 용량을 가늠하고(4). 다른 곳으로 옮길 땐 먼저 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--dry-run&lt;/code&gt;으로 무엇이 바뀔지 보고(5), 실제로 옮기고(6), 반복 백업이라면 바뀐 것만 가는지 확인하고(7), 파일 하나뿐이면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;scp&lt;/code&gt;로 짧게(8). 옮긴 뒤에는 방금 실제로 만들어졌는지(9)와 안 깨졌는지(10)를 확인해야 &quot;백업했다&quot;고 말할 수 있습니다 &amp;mdash; 압축 파일이 존재한다는 것과 복원 가능하다는 것은 다른 얘기입니다.&lt;/p&gt;
 
&lt;/div&gt;

&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/tar-%C2%B7-rsync-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%EA%B8%89%ED%9E%88-%EC%98%AE%EA%B2%BC%EB%8A%94%EB%8D%B0-%EB%AC%B4%EC%96%B8%EA%B0%80-%EB%B9%A0%EC%A0%B8-%EC%9E%88%EC%8A%B5%EB%8B%88%EB%8B%A4&quot;&gt;옮겼는데 무언가 빠져 있을 때&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/find-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EC%A7%80%EC%9A%B0%EA%B8%B0-%EC%A0%84%EC%97%90-%EC%A0%95%EB%A7%90-%EA%B7%B8%EA%B2%83%EB%A7%8C-%EC%9E%A1%ED%9E%88%EB%8A%94%EC%A7%80-%ED%99%95%EC%9D%B8%ED%95%98%EB%8A%94-%EB%B2%95&quot;&gt;백업 대상을 정확히 고르는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/df-%C2%B7-du-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EB%A1%9C%EA%B7%B8%EB%A5%BC-%EC%A7%80%EC%9B%A0%EB%8A%94%EB%8D%B0-%EC%9A%A9%EB%9F%89%EC%9D%B4-%EC%95%88-%EC%A4%84%EC%96%B4%EB%93%AD%EB%8B%88%EB%8B%A4&quot;&gt;백업 공간이 실제로 있는지&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>리눅스/장애 M+1분</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/48</guid>
      <comments>https://wowpanel.tistory.com/entry/%EB%A6%AC%EB%88%85%EC%8A%A4-%EC%95%95%EC%B6%95%C2%B7%EB%B0%B1%EC%97%85-Top-10-%E2%80%94-tar%C2%B7rsync%C2%B7scp-%EB%B3%80%EC%88%98%EB%A7%8C-%EB%B0%94%EA%BF%94-%EA%B7%B8%EB%8C%80%EB%A1%9C-%EC%93%B0%EB%8A%94-%EB%AA%85%EB%A0%B9#entry48comment</comments>
      <pubDate>Thu, 3 Sep 2026 08:12:43 +0900</pubDate>
    </item>
    <item>
      <title>ALB&amp;middot;NLB&amp;middot;CLB &amp;mdash; L4/L7 스위치 한 대가 세 갈래로 나뉜 이유</title>
      <link>https://wowpanel.tistory.com/entry/ALB%C2%B7NLB%C2%B7CLB-%E2%80%94-L4L7-%EC%8A%A4%EC%9C%84%EC%B9%98-%ED%95%9C-%EB%8C%80%EA%B0%80-%EC%84%B8-%EA%B0%88%EB%9E%98%EB%A1%9C-%EB%82%98%EB%89%9C-%EC%9D%B4%EC%9C%A0</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 로드밸런서 어플라이언스(F5 BIG-IP&amp;middot;Citrix ADC 같은 장비) 한 대에 VIP(Virtual IP &amp;mdash; 클라이언트에게 노출하는 대표 IP 주소, 실제 서버들은 이 뒤에 숨어 있다) 하나를 만들고, 그 안에서 4계층 포트 기반 분산과 7계층 URL&amp;middot;호스트 기반 라우팅을 같은 화면에서 같이 설정했습니다. 헬스 모니터도, 퍼시스턴스(persistence &amp;mdash; 같은 클라이언트를 같은 서버로 계속 보내는 세션 고정)도 한 장비 설정 안에 다 있었습니다. AWS는 이 하나의 어플라이언스를 세 갈래로 쪼갭니다 &amp;mdash; 7계층에서 동작하는 &lt;b&gt;ALB&lt;/b&gt;(Application Load Balancer), 4계층에서 동작하는 &lt;b&gt;NLB&lt;/b&gt;(Network Load Balancer), 그리고 두 계층에 걸쳐 있었지만 지금은 구세대로 분류된 &lt;b&gt;CLB&lt;/b&gt;(Classic Load Balancer)입니다. 이름은 전부 &quot;로드밸런서&quot;지만 계층이 다르면 그 계층에서만 볼 수 있는 정보와 그 계층에만 있는 기능이 갈리고, 이 구분을 놓치면 온프레미스에서 당연했던 기능(고정 IP, 순수 TCP 릴레이)이 선택한 타입에는 아예 없다는 걸 나중에야 알게 됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;새벽 배포 창. 무중단 배포라고 확신하고 오토 스케일링 그룹의 인스턴스를 하나씩 순서대로 내리고 새 버전으로 교체하는 롤링 배포를 돌린다. 배포가 끝난 뒤 모니터링을 보니 배포가 진행되던 구간마다 일부 요청이 500 에러로 실패한 흔적이 남아 있다. 애플리케이션 로그에는 에러가 없고, 헬스체크도 배포 내내 정상이었다. 재현을 시도해도 매번 같은 요청에서 나는 게 아니라 간헐적이라 원인을 좁히기 어렵다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글은 실제 AWS 콘솔 화면이나 CLI 실행 결과를 캡처하지 않습니다. ALB&amp;middot;NLB&amp;middot;CLB가 지원하는 프로토콜, 기본 라우팅 알고리즘, 헬스체크&amp;middot;등록 해제 동작, 교차 영역 분산 기본값, 과금 구조처럼 이 글이 다루는 사실 하나하나는 전부 AWS 공식 문서(Elastic Load Balancing 사용 설명서&amp;middot;기능 비교&amp;middot;가격 페이지)를 직접 열어 원문을 대조한 것입니다. 정확한 가격은 리전과 시점에 따라 바뀌므로, 구체적인 숫자를 쓸 때는 &quot;이 글 작성 시점(2026-08-27) 기준&quot;이라고 밝힙니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;ALB&amp;middot;NLB&amp;middot;CLB가 정확히 뭔가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;온프레미스 대응표&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;실무에서 반드시 알아야 하는 것&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;온프레미스 관리자가 자주 하는 오해&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;비용&amp;middot;운영 감각&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;관련 개념&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s7&quot;&gt;한눈에 정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. ALB&amp;middot;NLB&amp;middot;CLB가 정확히 뭔가&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;ALB&lt;/b&gt;는 요청의 내용(URL 경로, 호스트 헤더 등)을 보고 어디로 보낼지 판단합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;An Application Load Balancer functions at the application layer, the seventh layer of the Open Systems Interconnection (OSI) model.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;OSI(Open Systems Interconnection &amp;mdash; 네트워크 통신을 7개 계층으로 나눠 설명하는 참조 모델) 7계층, 즉 애플리케이션 계층에서 동작한다는 뜻입니다. HTTP 요청 자체를 열어 보고 판단하므로, 경로별&amp;middot;도메인별로 다른 서버 그룹에 보내는 것 같은 콘텐츠 기반 라우팅이 ALB의 핵심입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;NLB&lt;/b&gt;는 요청 내용을 보지 않고 IP&amp;middot;포트 단위로만 분산합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A Network Load Balancer functions at the fourth layer of the Open Systems Interconnection (OSI) model. It can handle millions of requests per second.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;4계층, 즉 전송 계층에서 동작합니다. 애플리케이션 내용을 들여다보지 않는 대신 초저지연&amp;middot;고처리량에 특화돼 있고, 순수 TCP&amp;middot;UDP 트래픽을 그대로 중계하는 데 적합합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;CLB&lt;/b&gt;는 AWS가 가장 먼저 내놓은 로드밸런서로, 지금은 새 워크로드에 쓰라고 권장하지 않는 구세대입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Classic Load Balancers are the previous generation of load balancers from Elastic Load Balancing. We recommend that you migrate to a current generation load balancer.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;CLB 소개 문서 자체에는 계층을 명시한 문장이 없지만, AWS의 공식 기능 비교표는 CLB를 &quot;Layer 4/7&quot;로 분류합니다 &amp;mdash; 4계층 포트 기반 분산과 기본적인 7계층 프로토콜(HTTP/HTTPS) 지원을 한 컴포넌트 안에서 같이 제공했던 구조입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;세 타입 모두 공통으로 갖는 성격이 하나 있습니다 &amp;mdash; 클라이언트 입장에서는 뒤에 서버가 몇 대든 상관없이 하나의 접점으로 보인다는 것입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A load balancer serves as the single point of contact for clients.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 VIP 하나 뒤에 여러 대의 리얼 서버를 숨겼던 것과 같은 감각입니다. AWS의 공식 기능 비교표도 ALB&amp;middot;NLB의 접근 방식을 &quot;Reachable via: VIP&quot;로 표기합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;960&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bm9Wnv/dJMcafulKzT/9A7HY9AgWdrg6lFsJybEY1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bm9Wnv/dJMcafulKzT/9A7HY9AgWdrg6lFsJybEY1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bm9Wnv/dJMcafulKzT/9A7HY9AgWdrg6lFsJybEY1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbm9Wnv%2FdJMcafulKzT%2F9A7HY9AgWdrg6lFsJybEY1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;960&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;960&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 온프레미스 대응표&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 물건이 아니라 &quot;가장 가까운 것&quot;입니다.&lt;/b&gt; 온프레미스 어플라이언스 한 대가 하던 일이 AWS에서는 계층별로 나뉘어 있다는 것부터 잡아야 3장&amp;middot;4장이 자연스럽게 이어집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;온프레미스&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;AWS&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;같은 점&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;다른 점&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;L7 스위치의 콘텐츠 기반 라우팅(URL&amp;middot;호스트별 분기)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;경로&amp;middot;호스트 헤더로 다른 서버 그룹에 분배&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고정 IP를 직접 지원하지 않음(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;L4 스위치의 순수 IP&amp;middot;포트 기반 분산&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NLB&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;요청 내용을 안 보고 초저지연 처리&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;UDP까지 처리(3장), 정적&amp;middot;탄력적 IP 지원(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VIP + 헬스 모니터&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;헬스체크(공통)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비정상 대상을 자동으로 제외&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대상이 전부 비정상이면 오히려 전체에 흘려보냄(3장, fail-open)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;퍼시스턴스(세션 고정)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;스티키 세션(공통 개념, ALB&amp;middot;CLB만 지원)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;같은 클라이언트를 같은 서버로 유지&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;쿠키 기반, 소스 IP 기반이 아님(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;통합형 구형 어플라이언스&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;CLB&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;4&amp;middot;7계층 기능을 한 컴포넌트가 같이 제공&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;신규 워크로드 비권장, 순수 TCP/SSL 리스너는 ALB엔 아예 없음(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 실무에서 반드시 알아야 하는 것&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;타입마다 지원하는 프로토콜 자체가 다르다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 기능 비교표에서 이 글이 다루는 세 타입(ALB&amp;middot;NLB&amp;middot;CLB)만 추리면 다음과 같습니다(원문 표에는 게이트웨이 로드밸런서 열도 있지만 이 글의 범위 밖이라 뺐습니다. 원문이 &quot;-&quot;로 비워 둔 칸은 그 항목 자체가 해당 타입에 없다는 뜻이라 괄호로 풀어 썼습니다).&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;ALB&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;NLB&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;CLB&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;계층&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Layer 7&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Layer 4&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Layer 4/7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;타겟 타입&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IP, Instance, Lambda&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IP, Instance, Application Load Balancer&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;(원문 &quot;-&quot;, 개별 타겟 타입 구분 없음)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;프로토콜 리스너&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;HTTP, HTTPS, gRPC&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;TCP, UDP, TLS&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;TCP, SSL/TLS, HTTP, HTTPS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;접근 방식&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VIP&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VIP&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;(원문 &quot;-&quot;, VIP 개념 표기 없음)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;ALB에는 순수 TCP&amp;middot;SSL 리스너 자체가 없습니다.&lt;/b&gt; HTTP/HTTPS/gRPC만 받습니다. 반대로 NLB&amp;middot;CLB는 TCP&amp;middot;TLS(SSL) 리스너를 지원합니다 &amp;mdash; 이 차이가 4장 오해로 이어집니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;스티키 세션은 쿠키 기반이다 &amp;mdash; 소스 IP 퍼시스턴스와는 다르다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스 L4/L7 스위치의 퍼시스턴스는 대부분 클라이언트의 소스 IP를 기준으로 같은 서버에 고정합니다. ALB의 스티키 세션은 다른 방식으로 동작합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;To use sticky sessions, the client must support cookies.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;ALB는 자체 쿠키(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;AWSALB&lt;/code&gt;)를 만들어 클라이언트에게 내려주고, 이후 요청에 그 쿠키가 실려 오는지로 같은 대상을 판단합니다 &amp;mdash; 소스 IP는 보지 않습니다. 이 쿠키의 유효 기간은 7일로 고정돼 있고 바꿀 수 없습니다. 쿠키를 저장하지 않는 클라이언트(일부 API 클라이언트, 헬스체크 스크립트 등)라면 스티키 세션을 켜 놔도 매번 다른 대상으로 흩어집니다 &amp;mdash; 온프레미스에서 소스 IP 기반으로 문제없이 되던 구성이 AWS로 오면서 그대로 안 되는 지점입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;ALB의 라우팅은 규칙(rule) 우선순위로 결정된다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The rules that you define for a listener determine how the load balancer routes requests to its registered targets. Each rule consists of a priority, one or more actions, and one or more conditions. When the conditions for a rule are met, then its actions are performed.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;경로&amp;middot;호스트 헤더 조건을 우선순위 순서로 평가해 맞는 규칙의 액션(어느 타겟 그룹으로 보낼지)을 실행하는 구조입니다. 타겟 그룹 안에서 실제로 어떤 대상에게 요청을 줄지는 별도의 라우팅 알고리즘이 결정합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The default routing algorithm is round robin; alternatively, you can specify the least outstanding requests routing algorithm.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;기본값은 라운드 로빈이고, 요청마다 처리 부하가 들쭉날쭉하면 least outstanding requests(처리 중인 요청이 가장 적은 대상 우선)나 weighted random으로 바꿀 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; L7 스위치로 하던 경로 기반 라우팅을 그대로 옮기려는 시도&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/api&lt;/code&gt;로 오는 요청은 API 서버군으로, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/static&lt;/code&gt;으로 오는 요청은 정적 파일 서버군으로 나누는 규칙을 L7 스위치 하나에 걸어 뒀다고 합시다. AWS로 옮기면서 &quot;로드밸런서니까 아무거나 하나 만들어서 리스너만 두 개 걸면 되겠지&quot; 하고 CLB를 골라 HTTP 리스너 하나 아래 API 서버와 정적 파일 서버를 전부 등록하면, 요청은 경로와 무관하게 등록된 인스턴스 전체에 그냥 순서대로 분산됩니다. CLB에는 애초에 &quot;규칙&quot;이라는 개념 자체가 없어서, 경로를 보고 갈라 보내는 동작을 설정할 방법이 없기 때문입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;정답은 ALB를 쓰고, API 서버용 타겟 그룹과 정적 파일 서버용 타겟 그룹을 각각 만든 뒤, 리스너에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/api/*&lt;/code&gt; 경로 조건은 API 타겟 그룹으로, 나머지는 기본 규칙으로 정적 파일 타겟 그룹으로 보내는 규칙을 우선순위대로 추가하는 것입니다. 온프레미스에서 L7 스위치 화면 하나에 있던 설정이 AWS에서는 &quot;타입 선택(ALB)&quot;과 &quot;리스너 규칙&quot;이라는 두 단계로 나뉘었을 뿐, 할 수 있는 일 자체는 그대로 옮겨집니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;헬스체크가 전부 실패해도 로드밸런서는 트래픽을 끊지 않는다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;However, if the load balancer doesn't have enough healthy targets, it automatically sends traffic to all registered targets (fail open).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;정상 대상이 하나도 없으면 오히려 등록된 대상 전체에 트래픽을 흘려보냅니다(fail-open). 온프레미스 헬스 모니터가 &quot;전부 비정상이면 서비스 자체를 내린다&quot;는 감각으로 설정돼 있었다면 반대 방향의 동작이라 헷갈리기 쉽습니다 &amp;mdash; 이건 아무것도 못 받는 것보다 에러라도 낫다는 설계 판단입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;인스턴스를 등록 해제해도 곧바로 끊기지 않는다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Elastic Load Balancing stops sending requests to targets that are deregistering. By default, Elastic Load Balancing waits 300 seconds before completing the deregistration process, which can help in-flight requests to the target to complete.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;등록 해제를 시작해도 기본 300초 동안은 진행 중이던 요청(in-flight request)이 끝날 시간을 줍니다. 다만 이 유예 시간이 끝나기 전에 대상 쪽에서 먼저 연결을 끊으면 얘기가 달라집니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If a deregistering target terminates the connection before the deregistration delay elapses, the client receives a 500-level error response.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 동작은 4장에서 도입부 시나리오를 그대로 풀어 줍니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;920&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/rVtl6/dJMcahS87SQ/0CqSTUWkX3y8a9d76yeJwk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/rVtl6/dJMcahS87SQ/0CqSTUWkX3y8a9d76yeJwk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/rVtl6/dJMcahS87SQ/0CqSTUWkX3y8a9d76yeJwk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FrVtl6%2FdJMcahS87SQ%2F0CqSTUWkX3y8a9d76yeJwk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;920&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;920&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 온프레미스 관리자가 자주 하는 오해&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 1. &quot;로드밸런서니까 당연히 고정 IP 하나로 붙일 수 있겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 로드밸런서에 할당한 VIP가 곧 고정 IP였으니, AWS 로드밸런서도 당연히 고정 IP를 준다고 생각하기 쉽습니다. 하지만 ALB 소개 문서 어디에도 고정 IP 관련 언급이 없는 반면, NLB는 명시적으로 지원합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Elastic Load Balancing creates a network interface for each Availability Zone you enable. Each load balancer node in the Availability Zone uses this network interface to get a static IP address. When you create an Internet-facing load balancer, you can optionally associate one Elastic IP address per subnet.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;파트너사가 방화벽 화이트리스트에 등록할 로드밸런서의 고정 IP를 요구하는데 이미 ALB로 서비스를 구성해 놨다면, ALB 자체를 고정 IP로 바꿀 방법은 없습니다. 이럴 때 흔히 쓰는 구성은 앞단에 NLB를 하나 더 두고 그 뒤에 기존 ALB를 타겟으로 등록하는 것입니다 &amp;mdash; 공식 기능 비교표가 NLB의 타겟 타입에 &quot;Application Load Balancer&quot;를 포함시켜 놓은 것도 이 구성을 염두에 둔 것입니다. 경로 기반 라우팅은 ALB가 그대로 처리하고, 파트너사에 알려 줄 고정 IP는 NLB가 제공하는 식입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 2. &quot;헬스체크만 정상이면 아무 때나 인스턴스를 내려도 안전하다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;도입부 시나리오가 바로 이 오해에서 시작합니다. 오토 스케일링 그룹이 롤링 배포 중 인스턴스를 종료할 때, 헬스체크가 정상이었다는 것과 그 인스턴스가 지금 처리 중인 요청이 없다는 것은 별개입니다. 등록 해제를 시작하면 기본 300초의 유예 시간(3장)이 있지만, 이 시간이 지나기 전에 인스턴스 자체가 연결을 끊어 버리면(운영체제 종료, 프로세스 강제 종료 등) 그 순간 처리 중이던 요청은 500 에러로 클라이언트에 돌아갑니다. 배포 스크립트가 등록 해제 신호를 보내자마자 바로 인스턴스를 종료하도록 짜여 있었다면, 헬스체크 로그는 배포 내내 정상으로 보이면서도 간헐적인 500 에러가 나는 정확히 이 패턴이 재현됩니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;조치는 배포 절차에 등록 해제 유예 시간만큼(또는 그보다 조금 더) 기다리는 단계를 넣는 것입니다. 오토 스케일링의 인스턴스 새로 고침(instance refresh) 기능을 쓴다면 종료 대기(termination wait) 시간을 등록 해제 지연과 맞추고, 직접 스크립트로 내린다면 타겟을 등록 해제한 뒤 그 유예 시간만큼 대기했다가 인스턴스를 종료하도록 순서를 바꿉니다. 당장 급하게 배포를 멈출 수 없는 상황이라면 유예 시간을 늘려 여유를 벌 수도 있지만, 근본적으로는 &quot;등록 해제 신호&quot;와 &quot;인스턴스 종료&quot; 사이에 시간차를 두는 게 맞는 방향입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;840&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/cVFa1n/dJMcahMryJ1/IXhjpvJlsi9QQbxLDOl2o1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/cVFa1n/dJMcahMryJ1/IXhjpvJlsi9QQbxLDOl2o1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/cVFa1n/dJMcahMryJ1/IXhjpvJlsi9QQbxLDOl2o1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcVFa1n%2FdJMcahMryJ1%2FIXhjpvJlsi9QQbxLDOl2o1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;840&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;840&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 3. &quot;교차 영역 분산 기본값은 셋 다 똑같겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;가용 영역(AZ, Availability Zone &amp;mdash; 물리적으로 분리된 데이터센터 단위)을 여러 개 걸쳐 두면 로드밸런서가 알아서 전체 대상에 고르게 나눠 줄 거라 생각하기 쉽지만, 교차 영역 로드밸런싱(cross-zone load balancing) 기본값은 타입마다 다릅니다. ALB는 끌 수조차 없이 항상 켜져 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;With Application Load Balancers, cross-zone load balancing is always turned on at the load balancer level, and cannot be turned off.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;반면 NLB는 기본값이 꺼짐입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;By default, each load balancer node distributes traffic across the registered targets in its Availability Zone only. If you enable cross-zone load balancing, each load balancer node distributes traffic across the registered targets in all enabled Availability Zones.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;NLB를 쓰면서 한쪽 가용 영역에만 인스턴스를 몰아 뒀다면, 다른 가용 영역의 로드밸런서 노드로 들어온 요청은 그 영역 안의 대상만 찾다가 아예 처리할 곳을 못 찾을 수 있습니다. 가용 영역마다 대상 수를 고르게 맞추거나, 필요하다면 교차 영역 로드밸런싱을 직접 켜야 합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 4. &quot;CLB에서 ALB로 옮기면 기능이 다 그대로 되겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;ALB가 더 최신이니 CLB의 상위 호환일 거라 생각하기 쉽지만, 3장 비교표대로 ALB에는 순수 TCP&amp;middot;SSL 리스너 자체가 없습니다. MQTT 브로커나 커스텀 바이너리 프로토콜을 쓰는 서버, 또는 HTTP가 아닌 TCP 기반 서비스를 CLB 뒤에 두고 있었다면, 그 워크로드는 ALB로 옮길 수 없습니다 &amp;mdash; 이런 경우는 NLB가 맞는 대상입니다. &quot;로드밸런서 교체&quot;를 계획할 때는 지금 CLB가 실제로 어떤 프로토콜의 리스너를 쓰고 있는지부터 확인해야, HTTP/HTTPS 워크로드는 ALB로, 순수 TCP/UDP 워크로드는 NLB로 나눠서 옮길 수 있습니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 비용&amp;middot;운영 감각&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 로드밸런서 어플라이언스를 한 번 사서 설치하면 그 뒤로는 감가상각만 신경 쓰면 되는 자산(CAPEX, Capital Expenditure &amp;mdash; 처음에 사들여 감가상각하는 자본 지출)이었습니다. ELB(Elastic Load Balancing)는 다릅니다 &amp;mdash; 만들어 둔 시간과 처리한 트래픽 양에 따라 계속 청구됩니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;ALB의 과금은 시간당 기본 요금에 LCU(Load Balancer Capacity Unit)라는 처리량 단위 요금을 더하는 구조입니다. 이 글 작성 시점(2026-08-27) us-east-1(버지니아 북부) 리전 기준으로, 시간당 기본 요금은 $0.0225, LCU당 요금은 $0.008입니다. LCU는 한 가지 지표가 아니라 네 가지 차원 중 가장 높은 사용량을 기준으로 계산됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;An LCU measures the dimensions on which the Application Load Balancer processes your traffic (averaged over an hour).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You are charged only on the dimension with the highest usage.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;네 차원은 새 연결 수(초당), 활성 연결 수(분당), 처리 바이트(GB), 그리고 &lt;b&gt;규칙 평가 수(rule evaluations)&lt;/b&gt;입니다. 온프레미스 감각으로는 낯선 항목이 마지막 것입니다 &amp;mdash; 리스너 규칙을 얼마나 복잡하게 짜 두느냐(조건 개수, 트래픽당 평가되는 규칙 수)도 비용에 영향을 줍니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;NLB도 같은 구조로 과금됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;An NLCU measures the dimensions on which the Network Load Balancer processes your traffic (averaged over an hour).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;다만 NLCU당 요금은 $0.006이고, 규칙 평가 차원이 없는 대신 새 연결&amp;middot;활성 연결&amp;middot;처리 바이트 세 차원만 봅니다 &amp;mdash; NLB는 콘텐츠를 보고 규칙을 평가하지 않으니 애초에 이 차원이 존재하지 않는 것입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;트래픽이 없어도 시간당 요금은 그대로 쌓입니다.&lt;/b&gt; 온프레미스 어플라이언스처럼 &quot;안 쓰는 시간엔 그냥 놀고 있는 것&quot;이 아니라, 로드밸런서를 만들어 둔 시간만큼 최소 요금이 계속 붙습니다. 개발&amp;middot;테스트 환경에 만들어 둔 로드밸런서를 쓰지 않는 기간에도 지우지 않으면, 실제 사용량과 무관하게 요금이 쌓입니다. 정확한 숫자는 리전과 시점에 따라 바뀌므로, 실제 도입 전에는 반드시 공식 가격 페이지에서 해당 리전 기준 최신 값을 확인해야 합니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 관련 개념&lt;/h2&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;타겟 그룹&lt;/b&gt; &amp;mdash; 로드밸런서가 실제로 트래픽을 보내는 대상(인스턴스&amp;middot;IP&amp;middot;Lambda) 묶음. 헬스체크&amp;middot;라우팅 알고리즘&amp;middot;등록 해제 지연 같은 설정이 로드밸런서가 아니라 이 단위에 붙는다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Auto Scaling&lt;/b&gt; &amp;mdash; 인스턴스를 자동으로 늘리고 줄이는 서비스. 늘어난 인스턴스는 타겟 그룹에 자동 등록되고, 줄어들 때는 등록 해제 절차(4장)를 거친다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Route 53&lt;/b&gt; &amp;mdash; 도메인 이름을 로드밸런서로 연결하는 DNS 서비스.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS Certificate Manager&lt;/b&gt; &amp;mdash; HTTPS 리스너에 붙일 SSL/TLS 인증서를 발급&amp;middot;관리하는 서비스.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS WAF&lt;/b&gt; &amp;mdash; ALB 앞단에서 요청 내용을 검사해 악성 트래픽을 걸러내는 서비스.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;VPC&amp;middot;보안 그룹&lt;/b&gt; &amp;mdash; 로드밸런서가 어느 서브넷에 놓이고 어떤 트래픽을 받을 수 있는지를 결정하는 네트워크 경계.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;7. 한눈에 정리&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;확인할 것&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;계층&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB=7계층(내용 기반 라우팅), NLB=4계층(IP&amp;middot;포트만), CLB=4/7계층(구세대, 신규 비권장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;프로토콜&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB는 HTTP/HTTPS/gRPC만, NLB는 TCP/UDP/TLS, CLB는 TCP/SSL/HTTP/HTTPS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;고정 IP&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NLB만 정적&amp;middot;탄력적 IP 지원, ALB엔 없음 &amp;mdash; 필요하면 앞단에 NLB를 둔다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;라우팅&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB는 리스너 규칙(우선순위&amp;middot;조건)으로 분기, CLB엔 이 개념 자체가 없음&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본 알고리즘&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;라운드 로빈(least outstanding requests&amp;middot;weighted random으로 변경 가능)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;헬스체크 실패&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대상 전부 비정상이면 오히려 전체에 흘려보냄(fail-open)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;등록 해제&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본 300초 유예, 그 전에 연결이 끊기면 클라이언트에 500 에러&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;교차 영역 분산&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;ALB는 항상 켜짐(끌 수 없음), NLB는 기본 꺼짐&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비용&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;시간당 기본 요금 + LCU/NLCU(차원 중 최댓값 기준), 트래픽 없어도 시간당 요금은 그대로&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;CLB&amp;rarr;ALB 이전&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;순수 TCP/SSL 워크로드는 ALB로 못 옮김 &amp;mdash; NLB가 맞는 대상&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/VPC-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EC%82%AC%EB%82%B4%EB%A7%9D-%EC%84%A4%EA%B3%84-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B0%80%EC%83%81-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC&quot;&gt;로드밸런서를 놓을 서브넷 설계&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/ss-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EC%84%9C%EB%B2%84%EB%8A%94-%EB%96%B4%EB%8A%94%EB%8D%B0-%EC%97%B0%EA%B2%B0%EC%9D%B4-%EC%95%88-%EB%90%A9%EB%8B%88%EB%8B%A4&quot;&gt;백엔드에서 연결 상태를 보는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/Cannot-assign-requested-address-%E2%80%94-ephemeral-%ED%8F%AC%ED%8A%B8-%EA%B3%A0%EA%B0%88-%EC%9E%A5%EC%95%A0-%ED%95%98%EB%A3%A8-%EC%A0%84-%EC%8B%A0%ED%98%B8&quot;&gt;로드밸런서 뒤에서 포트가 먼저 마르는 이유&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>AWS/이게 뭐야?</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/88</guid>
      <comments>https://wowpanel.tistory.com/entry/ALB%C2%B7NLB%C2%B7CLB-%E2%80%94-L4L7-%EC%8A%A4%EC%9C%84%EC%B9%98-%ED%95%9C-%EB%8C%80%EA%B0%80-%EC%84%B8-%EA%B0%88%EB%9E%98%EB%A1%9C-%EB%82%98%EB%89%9C-%EC%9D%B4%EC%9C%A0#entry88comment</comments>
      <pubDate>Wed, 2 Sep 2026 20:01:31 +0900</pubDate>
    </item>
    <item>
      <title>리눅스 로그 빠르게 훑기 Top 10 &amp;mdash; journalctl, 변수만 바꿔 그대로 쓰는 명령</title>
      <link>https://wowpanel.tistory.com/entry/%EB%A6%AC%EB%88%85%EC%8A%A4-%EB%A1%9C%EA%B7%B8-%EB%B9%A0%EB%A5%B4%EA%B2%8C-%ED%9B%91%EA%B8%B0-Top-10-%E2%80%94-journalctl-%EB%B3%80%EC%88%98%EB%A7%8C-%EB%B0%94%EA%BF%94-%EA%B7%B8%EB%8C%80%EB%A1%9C-%EC%93%B0%EB%8A%94-%EB%AA%85%EB%A0%B9</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&quot;뭔가 이상하다&quot;는 보고를 받으면 결국 로그를 봐야 합니다. 그런데 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;journalctl&lt;/code&gt;을 옵션 없이 치면 부팅 이후 전체 로그가 쏟아지고, 정작 찾는 줄은 그 안 어딘가에 파묻힙니다. 이 글은 &lt;b&gt;범위를 좁혀서 보는&lt;/b&gt; 명령 10개를 모았습니다 &amp;mdash; 심각도로, 서비스로, PID로, 시간대로. 변수 하나만 바꿔 그대로 복붙하면 됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;로그가 너무 많다는 게 문제&lt;/b&gt; &amp;mdash; &quot;새벽에 뭔가 있었던 것 같다&quot;는 보고만 있고, 어느 서비스인지 몇 시쯤인지는 아직 모릅니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;journalctl&lt;/code&gt;을 그냥 치면 화면이 순식간에 넘어가 버립니다. 지금 필요한 건 전체를 읽는 게 아니라, &lt;b&gt;범위를 좁혀서 그 줄만&lt;/b&gt; 보는 명령입니다.&lt;/p&gt;
&lt;/div&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;이 글 쓰는 법 &amp;mdash; 변수 한 줄만 바꾸세요&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;변수가 있는 명령은 아래 형태입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=crond # &amp;larr; 이 줄의 값만 여러분이 볼 서비스로 바꾸세요&lt;br /&gt;journalctl -u &quot;$SVC&quot; -n 10 --no-pager # &amp;larr; 최근 10줄만&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;첫 줄의 오른쪽 값만 바꾸고 그대로 붙여넣으면 됩니다.&lt;/b&gt; 출력은 전부 실제 서버(Rocky Linux 9)에서 실행해 그대로 옮겼습니다 &amp;mdash; 여러분 서버의 서비스 이름&amp;middot;PID&amp;middot;시각은 다르게 나오는 게 정상입니다. 호스트명은 이 블로그의 도메인으로 바꿔 표기했습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;측정 환경: Rocky Linux 9.7(커널 5.14.0-611.47.1.el9_7) &amp;middot; systemd 252(252-55.el9_7.8.rocky.0.1, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;journalctl&lt;/code&gt;).&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;아래 10개는 전부 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sudo&lt;/code&gt; 없이 됩니다 &amp;mdash; 단 그 계정이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemd-journal&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;adm&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;wheel&lt;/code&gt; 그룹 중 하나에는 속해 있어야 합니다(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;groups&lt;/code&gt; 명령으로 확인). 셋 다 아니면 저널 파일 자체를 못 읽어 전부 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-- No entries --&lt;/code&gt;거나 권한 오류가 납니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;무엇부터 좁히나&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;그래도 안 잡히면&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;로그 자체가 말썽일 때&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;전체 치트시트&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. 무엇부터 좁히나&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;1) 심각도로 &amp;mdash; 에러만&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 범위를 가장 빠르게 좁히는 방법입니다. 서비스도 시간대도 모를 때, 일단 &quot;에러&quot;로 찍힌 것만 봅니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;journalctl -p err -n 20 --no-pager # &amp;larr; 심각도 err 이상만, 최근 20줄&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ journalctl -p err -n 20 --no-pager&lt;br /&gt;&amp;nbsp;8월 24 19:05:54 wowpanel.tistory.com sshd[3161083]: error: kex_exchange_identification: Connection closed by remote host&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. 결과가 한 줄뿐이어도 정상입니다 &amp;mdash; 최근에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;err&lt;/code&gt; 이상으로 찍힌 게 이것뿐이었다는 뜻입니다. 다만 이 서버처럼 도커&amp;middot;k3s 컨테이너가 표준출력에 직접 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;level=error&lt;/code&gt;라고 적어 내보내는 로그는 얘기가 다릅니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man systemd.exec&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SyslogLevel=&lt;/code&gt; 설명대로, 특별히 설정하지 않으면 journald는 그런 줄도 유닛의 기본 우선순위(기본값 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;info&lt;/code&gt;)로 기록할 뿐, 메시지 안의 &quot;error&quot;라는 글자까지 읽어서 우선순위를 올려주지는 않습니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-p err&lt;/code&gt;로 걸러도 애플리케이션이 스스로 &quot;에러&quot;라고 적은 줄이 그대로 빠질 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;2) 특정 서비스 로그만&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; &quot;이 서비스가 뭘 했는지&quot;가 궁금할 때. 가장 많이 쓰게 되는 형태입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=crond # &amp;larr; 볼 서비스(유닛) 이름&lt;br /&gt;journalctl -u &quot;$SVC&quot; -n 10 --no-pager # &amp;larr; 최근 10줄만&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SVC=crond&lt;br /&gt;$ journalctl -u &quot;$SVC&quot; -n 10 --no-pager&lt;br /&gt;&amp;nbsp;8월 24 23:01:01 wowpanel.tistory.com CROND[3227149]: (root) CMD (run-parts /etc/cron.hourly)&lt;br /&gt;&amp;nbsp;8월 24 23:01:01 wowpanel.tistory.com run-parts[3227158]: (/etc/cron.hourly) finished 0anacron&lt;br /&gt;&amp;nbsp;8월 24 23:01:01 wowpanel.tistory.com CROND[3227148]: (root) CMDEND (run-parts /etc/cron.hourly)&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com CROND[3244130]: (root) CMD (run-parts /etc/cron.hourly)&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com anacron[3244141]: Anacron started on 2026-08-25&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com anacron[3244141]: Normal exit (0 jobs run)&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com run-parts[3244143]: (/etc/cron.hourly) finished 0anacron&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com CROND[3244129]: (root) CMDEND (run-parts /etc/cron.hourly)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. 서비스 이름은 유닛 이름입니다(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl list-units --type=service&lt;/code&gt;로 확인). &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-- No entries --&lt;/code&gt;가 나오면 그 유닛이 systemd로 관리되지 않거나, 아직 한 번도 로그를 안 남겼다는 뜻입니다 &amp;mdash; 서비스 이름 오타부터 의심하세요.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;3) 특정 PID만&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ps&lt;/code&gt;나 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ss&lt;/code&gt;로 이미 PID를 찾아 놓은 상태입니다. 그 프로세스가 방금 뭘 로그로 남겼는지, 유닛 이름을 몰라도(또는 systemd 관리 밖이어도) 바로 봅니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;PID=2036 # &amp;larr; ps/pgrep으로 찾은 PID&lt;br /&gt;journalctl _PID=&quot;$PID&quot; -n 8 --no-pager # &amp;larr; 그 PID가 남긴 로그만&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ PID=2036&lt;br /&gt;$ journalctl _PID=&quot;$PID&quot; -n 8 --no-pager&lt;br /&gt;&amp;nbsp;8월 24 04:23:03 wowpanel.tistory.com dockerd[2036]: time=&quot;2026-08-24T04:23:03.269712336+09:00&quot; level=info msg=&quot;received task-delete event from containerd&quot; container=87f091d850190f56ccac255d45ed9ad940ddee54af062b26ca01eb077e158e4e module=libcontainerd namespace=moby topic=/tasks/delete type=&quot;*events.TaskDelete&quot;&lt;br /&gt;&amp;nbsp;8월 24 04:23:04 wowpanel.tistory.com dockerd[2036]: time=&quot;2026-08-24T04:23:04.628755667+09:00&quot; level=info msg=&quot;received task-delete event from containerd&quot; container=abe2a2f645cd0d3a8a483a4b90ae8069350cc3f6874f22b2b6822d751f38c4c4 module=libcontainerd namespace=moby topic=/tasks/delete type=&quot;*events.TaskDelete&quot;&lt;br /&gt;&amp;nbsp;8월 24 06:41:39 wowpanel.tistory.com dockerd[2036]: time=&quot;2026-08-24T06:41:39.284438921+09:00&quot; level=error msg=&quot;failed to validate image signature&quot; error=&quot;resolving signature chain for image sha256:74c4244427b7312c5b901fe0f67cbc53683d06f4f24c6faee65d4182bf0fa893: expected image index descriptor, got application/vnd.docker.distribution.manifest.list.v2+json&quot;&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;_PID=&lt;/code&gt;는 옵션이 아니라 systemd 저널의 &lt;b&gt;필드 매치&lt;/b&gt;라 앞에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-&lt;/code&gt;가 붙지 않습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-u&lt;/code&gt;(유닛)와 달리 그 프로세스가 systemd 서비스로 등록돼 있지 않아도 됩니다 &amp;mdash; 다만 PID는 재사용되므로, 한참 지난 뒤에 같은 PID로 조회하면 그사이 종료되고 새로 뜬 &lt;b&gt;다른 프로세스&lt;/b&gt;의 로그가 섞여 나올 수 있습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;4) 시간대로 좁히기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; &quot;그 시각쯤에 그 서비스가 뭘 했는지&quot;를 볼 때. 보고받은 시각이 있으면 여기서 시작합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=crond # &amp;larr; 볼 서비스&lt;br /&gt;journalctl -u &quot;$SVC&quot; --since &quot;1 hour ago&quot; --no-pager # &amp;larr; 최근 1시간만&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SVC=crond&lt;br /&gt;$ journalctl -u &quot;$SVC&quot; --since &quot;1 hour ago&quot; --no-pager&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com CROND[3244130]: (root) CMD (run-parts /etc/cron.hourly)&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com anacron[3244141]: Anacron started on 2026-08-25&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com anacron[3244141]: Normal exit (0 jobs run)&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com run-parts[3244143]: (/etc/cron.hourly) finished 0anacron&lt;br /&gt;&amp;nbsp;8월 25 00:01:02 wowpanel.tistory.com CROND[3244129]: (root) CMDEND (run-parts /etc/cron.hourly)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&quot;1 hour ago&quot;&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&quot;10 min ago&quot;&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&quot;2026-08-25 09:00:00&quot;&lt;/code&gt;처럼 자연어와 정확한 시각 둘 다 받습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-u&lt;/code&gt; 없이 이 옵션만 쓰면 &lt;b&gt;시스템 전체&lt;/b&gt; 로그를 그 시간대로 좁힙니다 &amp;mdash; 서비스를 특정 못 했을 때는 그렇게 먼저 던져 보고, 거기서 서비스 이름을 건진 다음 2)로 좁혀 가는 순서가 보통 더 빠릅니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;5) 언제 재부팅됐는지&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; &quot;혹시 그사이 재부팅됐나&quot;부터 확인할 때. 재부팅 여부 자체가 원인 후보를 절반으로 줄여 줍니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;journalctl --list-boots # &amp;larr; 이 저널이 아는 부팅 목록&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ journalctl --list-boots&lt;br /&gt;IDX BOOT ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;FIRST ENTRY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LAST ENTRY&lt;br /&gt;&amp;nbsp;&amp;nbsp;0 916cbf82bb8846b39b7b44b5131170cd Sun 2026-08-23 22:54:13 KST Tue 2026-08-25 00:29:23 KST&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IDX 0&lt;/code&gt;이 지금 부팅입니다. 이 서버는 목록에 &lt;b&gt;0 하나뿐&lt;/b&gt;입니다 &amp;mdash; 재부팅을 한 번도 안 했다는 뜻이 아니라, 예전 부팅의 저널이 용량 제한(뒤 9번 참고)에 밀려 이미 지워졌다는 뜻입니다. 이전 부팅이 있다면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;IDX -1&lt;/code&gt;처럼 음수로 나오고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;journalctl -b -1&lt;/code&gt;로 그 부팅만 따로 볼 수 있습니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 그래도 안 잡히면&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;6) 커널 로그만&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 서비스 로그에는 안 잡히는데 뭔가 이상할 때. OOM(메모리 부족으로 프로세스 강제 종료)&amp;middot;디스크 I/O 에러&amp;middot;네트워크 인터페이스 문제는 서비스가 아니라 커널이 남깁니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;dmesg&lt;/code&gt;의 systemd 버전입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;journalctl -k -n 12 --no-pager # &amp;larr; 커널이 남긴 최근 12줄&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ journalctl -k -n 12 --no-pager&lt;br /&gt;&amp;nbsp;8월 24 04:00:04 wowpanel.tistory.com kernel: veth04ef7d6d (unregistering): left promiscuous mode&lt;br /&gt;&amp;nbsp;8월 24 04:00:04 wowpanel.tistory.com kernel: cni0: port 36(veth04ef7d6d) entered disabled state&lt;br /&gt;&amp;nbsp;8월 24 04:23:01 wowpanel.tistory.com kernel: cni0: port 35(veth265b4d4a) entered blocking state&lt;br /&gt;&amp;nbsp;8월 24 04:23:01 wowpanel.tistory.com kernel: cni0: port 35(veth265b4d4a) entered disabled state&lt;br /&gt;&amp;nbsp;8월 24 04:23:01 wowpanel.tistory.com kernel: veth265b4d4a: entered allmulticast mode&lt;br /&gt;&amp;nbsp;8월 24 04:23:01 wowpanel.tistory.com kernel: veth265b4d4a: entered promiscuous mode&lt;br /&gt;&amp;nbsp;8월 24 04:23:01 wowpanel.tistory.com kernel: cni0: port 35(veth265b4d4a) entered blocking state&lt;br /&gt;&amp;nbsp;8월 24 04:23:01 wowpanel.tistory.com kernel: cni0: port 35(veth265b4d4a) entered forwarding state&lt;br /&gt;&amp;nbsp;8월 24 04:23:04 wowpanel.tistory.com kernel: cni0: port 35(veth265b4d4a) entered disabled state&lt;br /&gt;&amp;nbsp;8월 24 04:23:04 wowpanel.tistory.com kernel: veth265b4d4a (unregistering): left allmulticast mode&lt;br /&gt;&amp;nbsp;8월 24 04:23:04 wowpanel.tistory.com kernel: veth265b4d4a (unregistering): left promiscuous mode&lt;br /&gt;&amp;nbsp;8월 24 04:23:04 wowpanel.tistory.com kernel: cni0: port 35(veth265b4d4a) entered disabled state&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용, root 불필요. 이 서버는 컨테이너가 뜨고 내려갈 때마다 가상 네트워크 인터페이스(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;veth...&lt;/code&gt;)가 생겼다 사라지는 게 커널 로그의 대부분을 차지합니다 &amp;mdash; 컨테이너를 안 쓰는 서버라면 훨씬 조용합니다. OOM을 의심할 때는 여기서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Killed process&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Out of memory&lt;/code&gt;를 찾는 게 첫 순서입니다(재현하지 않고는 예시를 만들 수 없어 이 글에는 못 실었습니다).&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;7) 실시간으로 지켜보기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 문제를 지금 재현시키면서 로그가 실시간으로 찍히는 걸 보고 싶을 때.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=sshd # &amp;larr; 지켜볼 서비스&lt;br /&gt;journalctl -u &quot;$SVC&quot; -f # &amp;larr; 실시간으로, Ctrl+C로 멈춤&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SVC=sshd&lt;br /&gt;$ journalctl -u &quot;$SVC&quot; -f&lt;br /&gt;&amp;nbsp;8월 25 00:34:16 wowpanel.tistory.com sshd[3254326]: Failed password for invalid user dkq from 80.94.92.163 port 58422 ssh2&lt;br /&gt;&amp;nbsp;8월 25 00:34:17 wowpanel.tistory.com sshd[3254324]: Connection closed by invalid user wsupgrade 2.57.122.137 port 54428 [preauth]&lt;br /&gt;&amp;nbsp;8월 25 00:34:17 wowpanel.tistory.com sshd[3254326]: Connection closed by invalid user dkq 80.94.92.163 port 58422 [preauth]&lt;br /&gt;&amp;nbsp;8월 25 00:34:21 wowpanel.tistory.com sshd[3254366]: Invalid user wjyou from 80.94.92.30 port 60528&lt;br /&gt;&amp;nbsp;8월 25 00:34:22 wowpanel.tistory.com sshd[3254366]: pam_unix(sshd:auth): check pass; user unknown&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 위 출력은 실행 뒤 5초간 실제로 찍힌 줄이고, 그 뒤로도 화면은 계속 흐릅니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-f&lt;/code&gt;는 끝나지 않는 명령이라 &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Ctrl+C&lt;/code&gt;로 직접 멈춰야&lt;/b&gt; 프롬프트로 돌아옵니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-u&lt;/code&gt; 없이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;journalctl -f&lt;/code&gt;만 쓰면 시스템 전체가 흘러서, 이 서버처럼 여러 서비스가 동시에 도는 환경에서는 원하는 줄이 순식간에 밀려 나갑니다 &amp;mdash; 될 수 있으면 서비스를 좁힌 다음 켜세요.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;8) 서비스 + 시간대 + 심각도, 한 번에&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 앞의 좁히기를 다 합친 실전형입니다. &quot;그 서비스가, 그 시간대에, 에러를 냈는지&quot;를 한 줄로.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=sshd # &amp;larr; 볼 서비스&lt;br /&gt;journalctl -u &quot;$SVC&quot; --since &quot;6 hours ago&quot; -p err --no-pager # &amp;larr; 최근 6시간의 에러만&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SVC=sshd&lt;br /&gt;$ journalctl -u &quot;$SVC&quot; --since &quot;6 hours ago&quot; -p err --no-pager&lt;br /&gt;&amp;nbsp;8월 24 19:05:54 wowpanel.tistory.com sshd[3161083]: error: kex_exchange_identification: Connection closed by remote host&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. 옵션 순서는 안 가립니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-u&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;--since&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-p&lt;/code&gt;는 전부 AND로 겹칩니다. 결과가 없으면(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-- No entries --&lt;/code&gt;) 그 조건 셋을 동시에 만족하는 로그가 없다는 뜻이지, 명령이 잘못됐다는 뜻이 아닙니다 &amp;mdash; 조건 하나씩 빼면서 어느 조건이 결과를 0으로 만들었는지 확인하세요.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 로그 자체가 말썽일 때&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;9) 로그가 디스크를 얼마나 쓰나&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/var&lt;/code&gt;가 꽉 찼는데 원인이 안 보일 때, 저널 자체가 범인일 수 있습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;journalctl --disk-usage # &amp;larr; 저널이 디스크를 얼마나 쓰는지&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ journalctl --disk-usage&lt;br /&gt;Archived and active journals take up 298.1M in the file system.&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. 이 값이 예상보다 크면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/etc/systemd/journald.conf&lt;/code&gt;의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SystemMaxUse&lt;/code&gt;를 확인하세요 &amp;mdash; 기본값은 디스크의 일정 비율까지 자동으로 불어납니다. 5)번에서 본 것처럼 오래된 부팅의 로그부터 밀려나며 지워지므로, 용량을 줄이는 것과 &quot;예전 로그가 사라지는 것&quot;은 같은 동작의 양면입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;10) 키워드로 걸러 보기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;언제 쓰나&lt;/b&gt; &amp;mdash; 서비스와 대략의 시간대는 좁혔는데, 그 안에서도 특정 단어가 있는 줄만 보고 싶을 때.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;SVC=sshd # &amp;larr; 볼 서비스&lt;br /&gt;KEYWORD=&quot;invalid user&quot; # &amp;larr; 찾을 단어&lt;br /&gt;journalctl -u &quot;$SVC&quot; --no-pager | grep -i &quot;$KEYWORD&quot; | tail -6 # &amp;larr; 그 줄만, 최근 6개&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ SVC=sshd&lt;br /&gt;$ KEYWORD=&quot;invalid user&quot;&lt;br /&gt;$ journalctl -u &quot;$SVC&quot; --no-pager | grep -i &quot;$KEYWORD&quot; | tail -6&lt;br /&gt;&amp;nbsp;8월 25 00:31:27 wowpanel.tistory.com sshd[3253436]: Failed password for invalid user orp from 80.94.92.27 port 47336 ssh2&lt;br /&gt;&amp;nbsp;8월 25 00:31:27 wowpanel.tistory.com sshd[3253434]: Connection closed by invalid user kcw 80.94.92.28 port 50928 [preauth]&lt;br /&gt;&amp;nbsp;8월 25 00:31:28 wowpanel.tistory.com sshd[3253436]: Connection closed by invalid user orp 80.94.92.27 port 47336 [preauth]&lt;br /&gt;&amp;nbsp;8월 25 00:31:43 wowpanel.tistory.com sshd[3253507]: Invalid user syd from 92.118.39.81 port 60922&lt;br /&gt;&amp;nbsp;8월 25 00:31:45 wowpanel.tistory.com sshd[3253507]: Failed password for invalid user syd from 92.118.39.81 port 60922 ssh2&lt;br /&gt;&amp;nbsp;8월 25 00:31:46 wowpanel.tistory.com sshd[3253507]: Connection closed by invalid user syd 92.118.39.81 port 60922 [preauth]&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;주의&lt;/b&gt; &amp;mdash; 읽기 전용. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;grep -i&lt;/code&gt;는 대소문자를 가리지 않습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;journalctl&lt;/code&gt; 자체에도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-g&lt;/code&gt;(패턴 검색) 옵션이 있지만, 이렇게 파이프로 넘기면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;grep&lt;/code&gt;에 이미 익숙한 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-v&lt;/code&gt;(제외)&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-c&lt;/code&gt;(개수)&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-A/-B&lt;/code&gt;(앞뒤 줄)를 그대로 얹을 수 있어 더 유연합니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 전체 치트시트&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;한 번에 모아 둡니다. 변수(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SVC&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;PID&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;KEYWORD&lt;/code&gt;)만 바꿔서 그대로 쓰세요.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;# ── 무엇부터 좁히나&lt;br /&gt;journalctl -p err -n 20 --no-pager # &amp;larr; 심각도로&lt;br /&gt;SVC=crond; journalctl -u &quot;$SVC&quot; -n 10 --no-pager # &amp;larr; 서비스로&lt;br /&gt;PID=2036; journalctl _PID=&quot;$PID&quot; -n 8 --no-pager # &amp;larr; PID로&lt;br /&gt;SVC=crond; journalctl -u &quot;$SVC&quot; --since &quot;1 hour ago&quot; --no-pager # &amp;larr; 시간대로&lt;br /&gt;journalctl --list-boots # &amp;larr; 재부팅 이력&lt;br /&gt;&lt;br /&gt;# ── 그래도 안 잡히면&lt;br /&gt;journalctl -k -n 12 --no-pager # &amp;larr; 커널 로그만&lt;br /&gt;SVC=sshd; journalctl -u &quot;$SVC&quot; -f # &amp;larr; 실시간(Ctrl+C로 멈춤)&lt;br /&gt;SVC=sshd; journalctl -u &quot;$SVC&quot; --since &quot;6 hours ago&quot; -p err --no-pager # &amp;larr; 서비스+시간대+심각도&lt;br /&gt;&lt;br /&gt;# ── 로그 자체가 말썽일 때&lt;br /&gt;journalctl --disk-usage # &amp;larr; 저널 용량&lt;br /&gt;SVC=sshd; KEYWORD=&quot;invalid user&quot;; journalctl -u &quot;$SVC&quot; --no-pager | grep -i &quot;$KEYWORD&quot; | tail -6 # &amp;larr; 키워드로&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;마무리&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 10개는 순서대로 쓰면 됩니다 &amp;mdash; 서비스도 시간도 모르면 1)로 시작하고, 서비스를 알면 2)나 4), PID만 있으면 3), 재부팅 여부부터 확인하려면 5). 여기서도 안 잡히면 커널(6)이나 실시간(7)으로 넘어가고, 8)은 그 전부를 합친 실전형입니다. 로그 자체가 디스크를 잡아먹는 게 문제라면 9), 걸러 읽고 싶으면 10). &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;journalctl&lt;/code&gt;을 옵션 없이 치기 전에, 이 10개 중 하나로 먼저 좁혀 보세요.&lt;/p&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/journalctl-varlog-%EC%97%90-%EC%97%86%EB%8A%94-%EB%A1%9C%EA%B7%B8%EB%A5%BC-%EC%B0%BE%EC%95%84%EB%82%B4%EA%B3%A0-%EC%82%AC%EB%9D%BC%EC%A7%80%EA%B8%B0-%EC%A0%84%EC%97%90-%EB%B6%99%EC%9E%A1%EA%B8%B0&quot;&gt;systemd 로그를 다루는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/grep-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-2GB-%EB%A1%9C%EA%B7%B8%EC%97%90%EC%84%9C-%EC%9E%A5%EC%95%A0-%EC%9B%90%EC%9D%B8-%ED%95%9C-%EC%A4%84-%EC%B0%BE%EC%95%84%EB%82%B4%EA%B8%B0&quot;&gt;2GB 로그에서 한 줄 찾아내기&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/tail-%C2%B7-head-%C2%B7-less-%EC%A7%80%EA%B8%88%EB%8F%84-%EB%8A%98%EC%96%B4%EB%82%98%EB%8A%94-%EB%A1%9C%EA%B7%B8%EB%A5%BC-%EB%86%93%EC%B9%98%EC%A7%80-%EC%95%8A%EA%B3%A0-%EB%94%B0%EB%9D%BC%EA%B0%80%EA%B8%B0&quot;&gt;실시간 로그를 따라가는 법&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>리눅스/장애 M+1분</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/47</guid>
      <comments>https://wowpanel.tistory.com/entry/%EB%A6%AC%EB%88%85%EC%8A%A4-%EB%A1%9C%EA%B7%B8-%EB%B9%A0%EB%A5%B4%EA%B2%8C-%ED%9B%91%EA%B8%B0-Top-10-%E2%80%94-journalctl-%EB%B3%80%EC%88%98%EB%A7%8C-%EB%B0%94%EA%BF%94-%EA%B7%B8%EB%8C%80%EB%A1%9C-%EC%93%B0%EB%8A%94-%EB%AA%85%EB%A0%B9#entry47comment</comments>
      <pubDate>Wed, 2 Sep 2026 09:11:19 +0900</pubDate>
    </item>
    <item>
      <title>NAT 게이트웨이&amp;middot;인터넷 게이트웨이 &amp;mdash; 온프레미스 경계 라우터 하나가 둘로 갈라진 이유</title>
      <link>https://wowpanel.tistory.com/entry/NAT-%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4%C2%B7%EC%9D%B8%ED%84%B0%EB%84%B7-%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EA%B2%BD%EA%B3%84-%EB%9D%BC%EC%9A%B0%ED%84%B0-%ED%95%98%EB%82%98%EA%B0%80-%EB%91%98%EB%A1%9C-%EA%B0%88%EB%9D%BC%EC%A7%84-%EC%9D%B4%EC%9C%A0</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 경계 라우터(또는 방화벽) 한 대가 인터넷과 맞닿는 일을 전부 처리했습니다. 공인 IP를 받은 웹 서버로 외부 요청을 포트포워딩해 주는 것도, 사설 IP만 가진 내부 서버가 OS 패치나 외부 API를 받으러 나갈 때 주소를 변환(NAT, Network Address Translation &amp;mdash; 사설 IP를 공인 IP로 바꿔 인터넷과 통신할 수 있게 하는 주소 변환 기술)해 주는 것도 같은 장비 안에서 일어났습니다. AWS는 이 두 역할을 아예 다른 컴포넌트로 쪼갭니다 &amp;mdash; 외부에서 먼저 연결을 걸어올 수 있는 &lt;b&gt;인터넷 게이트웨이&lt;/b&gt;와, 내부에서 나가는 연결만 허용하는 &lt;b&gt;NAT 게이트웨이&lt;/b&gt;입니다. 이름이 비슷해 보이지만 &quot;누가 먼저 연결을 트는가&quot;가 완전히 갈리는 지점이고, 이 구분을 놓치면 프라이빗 서브넷의 서버가 인터넷에 나가지 못해 막히거나, 반대로 나가는 길을 열어 준다는 게 무엇을 의미하는지 모른 채 구성하게 됩니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;새벽에 모니터링 알람이 울린다. 두 가용 영역(AZ, Availability Zone &amp;mdash; 물리적으로 분리된 데이터센터 단위)에 나눠 오토 스케일링으로 띄워 둔 웹 서버 중 한쪽 그룹만 외부 결제 API 호출이 전부 타임아웃으로 실패하고 있다. 애플리케이션 로그도, 보안 그룹 규칙도, 결제사 쪽 상태 페이지도 멀쩡하다. 문제는 그 가용 영역이 아니라 다른 가용 영역에서 나던 장애였는데, 왜 이쪽 서버들까지 같이 영향을 받는지 알 수 없는 상황에서 시작한다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글은 실제 AWS 콘솔 화면이나 CLI 실행 결과를 캡처하지 않습니다. 인터넷 게이트웨이&amp;middot;NAT 게이트웨이의 동작 방식, 가용 영역 종속성, 대역폭&amp;middot;연결 수 제한, 비용 구조처럼 이 글이 다루는 사실 하나하나는 전부 AWS 공식 문서(Amazon VPC User Guide)를 직접 열어 원문을 대조한 것입니다. 정확한 가격은 리전과 시점에 따라 바뀌므로, 구체적인 숫자보다 &quot;무엇이 과금 대상이고 무엇이 아닌가&quot;에 초점을 둡니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;인터넷 게이트웨이&amp;middot;NAT 게이트웨이가 정확히 뭔가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;온프레미스 대응표&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;실무에서 반드시 알아야 하는 것&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;온프레미스 관리자가 자주 하는 오해&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;비용&amp;middot;운영 감각&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;관련 개념&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s7&quot;&gt;한눈에 정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. 인터넷 게이트웨이&amp;middot;NAT 게이트웨이가 정확히 뭔가&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;인터넷 게이트웨이&lt;/b&gt;는 VPC(Virtual Private Cloud &amp;mdash; 계정 안에 논리적으로 분리해 만드는 가상 네트워크)와 인터넷 사이를 양방향으로 연결하는 컴포넌트입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;An internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows communication between your VPC and the internet.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;퍼블릭 IP를 가진 인스턴스는 이 게이트웨이를 통해 인터넷으로 나갈 수도, 인터넷에서 먼저 걸려온 연결을 받을 수도 있습니다. 문제는 인스턴스가 실제로 아는 주소는 VPC 안의 사설 IP뿐이라는 점입니다. 이 변환을 대신 처리하는 것도 인터넷 게이트웨이입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The internet gateway logically provides the one-to-one NAT on behalf of your instance, so that when traffic leaves your VPC subnet and goes to the internet, the reply address field is set to the public IPv4 address or Elastic IP address of your instance, and not its private IP address. Conversely, traffic that's destined for the public IPv4 address or Elastic IP address of your instance has its destination address translated into the instance's private IPv4 address before the traffic is delivered to the VPC.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 인터넷 게이트웨이 자체가 이미 NAT(사설 IP 하나에 공인 IP 하나를 그대로 대응시키는 1:1 방식)를 수행하고 있습니다. 다만 이 NAT는 양방향입니다 &amp;mdash; 인스턴스가 먼저 나갈 때도, 인터넷 쪽에서 먼저 걸어올 때도 똑같이 동작합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;NAT 게이트웨이&lt;/b&gt;는 이름은 비슷하지만 방향이 다릅니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A NAT gateway is a Network Address Translation (NAT) service. You can use a NAT gateway so that instances in a private subnet can connect to services outside your VPC but external services can't initiate a connection with those instances.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;프라이빗 서브넷의 인스턴스가 밖으로 나가는 연결은 통과시키지만, 밖에서 먼저 그 인스턴스로 연결을 거는 것은 애초에 받지 않습니다. 내부 서버가 자기 사설 IP를 밖에 노출하지 않고 나갈 수 있게 해 주는 편도 통로인 셈입니다. 실제로 프라이빗 서브넷의 인스턴스가 NAT 게이트웨이를 거쳐 인터넷까지 나가는 경로는 한 번 더 주소 변환을 거칩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Both private and public NAT gateways map the source private IPv4 address of the instances to the private IPv4 address of the NAT gateway. For a public NAT gateway, the internet gateway then maps the private IPv4 address of the public NAT gateway to the Elastic IP address associated with the NAT gateway.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;인스턴스의 사설 IP &amp;rarr; NAT 게이트웨이의 사설 IP &amp;rarr; 인터넷 게이트웨이가 다시 탄력적 IP(Elastic IP, EIP &amp;mdash; 계정에 할당해 원하는 리소스에 붙였다 뗄 수 있는 고정 공인 IP)로 변환. 이 두 단계를 거쳐야 프라이빗 서브넷의 인스턴스가 인터넷에 닿습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;920&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bqRoed/dJMcaaNo6qT/KUE2BbupJmTQJdyRjtfbn0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bqRoed/dJMcaaNo6qT/KUE2BbupJmTQJdyRjtfbn0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bqRoed/dJMcaaNo6qT/KUE2BbupJmTQJdyRjtfbn0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbqRoed%2FdJMcaaNo6qT%2FKUE2BbupJmTQJdyRjtfbn0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;920&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;920&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 온프레미스 대응표&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 물건이 아니라 &quot;가장 가까운 것&quot;입니다.&lt;/b&gt; 대응시켜 놓고 다른 점을 무시하면 3장 시나리오와 4장 오해로 바로 이어집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;온프레미스&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;AWS&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;같은 점&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;다른 점&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;경계 라우터의 정적 1:1 NAT&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷 게이트웨이&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사설 IP &amp;harr; 공인 IP 양방향 변환&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;무료, VPC당 1개 제한(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사내 프록시&amp;middot;NAT 라우터(내부 서버 전용 아웃바운드)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NAT 게이트웨이&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;아웃바운드 전용, 내부 IP를 밖에 안 드러냄&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;가용 영역에 종속, 유료(3&amp;middot;5장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;방화벽 이중화 페어(HA, High Availability 클러스터)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;하나의 NAT 게이트웨이 안의 이중화&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;자동 이중화로 가용성 확보&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;그 가용 영역 자체가 죽으면 같이 죽는다(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;직접 구축한 리눅스 NAT 서버&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NAT 인스턴스(대안, 비권장)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사설 IP를 하나의 인터페이스로 내보냄&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;관리형이 아니라 패치&amp;middot;이중화를 직접 해야 함(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 실무에서 반드시 알아야 하는 것&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;인터넷 게이트웨이는 VPC당 하나, 무료&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;There is no charge for an internet gateway, but there are data transfer charges for EC2 instances that use internet gateways.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;인터넷 게이트웨이 자체는 요금이 없습니다. 다만 만들 수 있는 개수에는 제약이 있습니다 &amp;mdash; VPC 하나에는 동시에 하나만 연결할 수 있고, 리전당 기본 5개(상향 가능)까지만 만들 수 있습니다. 여러 VPC를 운영한다면 이 리전 단위 할당량을 계정 전체에서 나눠 쓰게 됩니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;인터넷 게이트웨이만 만든다고 되는 게 아니다 &amp;mdash; 라우팅 테이블이 결정한다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;인터넷 게이트웨이를 VPC에 연결해도, 그 자체로는 아무 서브넷도 인터넷에 열리지 않습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If a subnet is associated with a route table that has a route to an internet gateway, it's known as a public subnet. If a subnet is associated with a route table that does not have a route to an internet gateway, it's known as a private subnet.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;퍼블릭&amp;middot;프라이빗을 가르는 건 오직 그 서브넷의 라우팅 테이블에 인터넷 게이트웨이로 가는 경로(보통 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0.0.0.0/0&lt;/code&gt;, IPv4 전체 대상을 뜻하는 표기)가 있는지 여부입니다. 이 기준은 뒤에서 NAT 게이트웨이 경로를 추가한다고 서브넷 성격이 바뀌지 않는 이유(4장 오해 3)로 다시 나옵니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;NAT 게이트웨이는 퍼블릭 타입과 프라이빗 타입이 따로 있다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;퍼블릭 NAT 게이트웨이&lt;/b&gt;가 기본값이고, 프라이빗 서브넷을 인터넷으로 연결하는 흔한 용도입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Public &amp;ndash; (Default) Instances in private subnets can connect to the internet through a public NAT gateway, but the instances can't receive unsolicited inbound connections from the internet. You create a public NAT gateway in a public subnet and must associate an Elastic IP address with the NAT gateway at creation.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;프라이빗 NAT 게이트웨이&lt;/b&gt;는 인터넷이 아니라 다른 VPC나 온프레미스 네트워크로만 나가는 용도입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Private &amp;ndash; Instances in private subnets can connect to other VPCs or your on-premises network through a private NAT gateway, but the instances can't receive unsolicited inbound connections from the other VPCs or the on-premises network... You can't associate an Elastic IP address with a private NAT gateway.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;퍼블릭 타입은 반드시 퍼블릭 서브넷에 만들고 탄력적 IP를 붙여야 하는 반면, 프라이빗 타입은 애초에 탄력적 IP를 붙일 수조차 없습니다 &amp;mdash; 인터넷으로 나갈 일이 없기 때문입니다. 인터넷 접속은 필요 없고 사내망(Direct Connect&amp;middot;Site-to-Site VPN)으로만 나가면 되는 프라이빗 서브넷이라면 프라이빗 NAT 게이트웨이가 맞는 선택입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;NAT 게이트웨이는 가용 영역 하나에 묶여 있다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Each NAT gateway is created in a specific Availability Zone and implemented with redundancy in that zone.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;가용 영역 안에서는 자동으로 이중화되지만, 그 가용 영역 자체가 통째로 장애가 나면 그 NAT 게이트웨이도 같이 못 씁니다. 여러 가용 영역의 리소스가 NAT 게이트웨이 하나를 공유하도록 구성했다면, 공식 문서가 이 위험을 그대로 경고합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If you have resources in multiple Availability Zones and they share one NAT gateway, and if the NAT gateway's Availability Zone is down, resources in the other Availability Zones lose internet access. To improve resiliency, create a NAT gateway in each Availability Zone, and configure your routing to ensure that resources use the NAT gateway in the same Availability Zone.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;여러 가용 영역에 걸쳐 서버를 띄우는 이유가 애초에 한쪽이 죽어도 다른 쪽이 버티게 하려는 것인데, NAT 게이트웨이를 하나만 두면 그 목적이 무너집니다. 도입부 시나리오가 정확히 이 패턴이고, 4장에서 조치까지 이어 다룹니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;대역폭과 동시 연결 수에는 자동 확장되는 한도가 있다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A NAT gateway supports 5 Gbps of bandwidth and automatically scales up to 100 Gbps. If you require more bandwidth, you can split your resources into multiple subnets and create a NAT gateway in each subnet.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A NAT gateway can process one million packets per second and automatically scales up to 10 million packets per second. Beyond this limit, a NAT gateway will drop packets.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;트래픽이 늘면 5Gbps에서 시작해 100Gbps까지, 초당 백만 패킷에서 천만 패킷까지 자동으로 늘어납니다 &amp;mdash; 온프레미스처럼 장비를 미리 사이징할 필요가 없습니다. 다만 이 한도를 넘으면 그냥 패킷을 버립니다. 연결 수는 조금 다른 기준으로 제한됩니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Each IPv4 address can support up to 55,000 simultaneous connections to each unique destination. A unique destination is identified by a unique combination of destination IP address, the destination port, and protocol (TCP/UDP/ICMP).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;목적지 전체를 합쳐 55,000개가 아니라, 목적지 하나당 55,000개입니다.&lt;/b&gt; 서로 다른 외부 API 열 곳에 나눠서 나가는 트래픽이라면 사실상 이 한도에 걸릴 일이 거의 없지만, 특정 목적지 하나에 커넥션이 몰리는 배치 작업이라면 이 숫자를 기억해 둘 가치가 있습니다. 부족하면 NAT 게이트웨이에 IPv4 주소를 최대 8개(기본 IP 1개 + 보조 IP 7개)까지 붙여 늘릴 수 있습니다 &amp;mdash; 다만 퍼블릭 NAT 게이트웨이에 붙일 수 있는 탄력적 IP는 기본 2개뿐이라, 8개까지 쓰려면 할당량 상향을 따로 신청해야 합니다(5장).&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;NAT 게이트웨이에는 보안 그룹을 붙일 수 없다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You can't associate a security group with a NAT gateway. You can associate security groups with your instances to control inbound and outbound traffic.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;트래픽 통제는 NAT 게이트웨이가 아니라 그 뒤에 있는 인스턴스 쪽 보안 그룹의 몫입니다. NAT 게이트웨이는 순수하게 주소를 변환해 중계하는 역할만 하고, 허용&amp;middot;차단 판단에는 관여하지 않습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 프라이빗 서브넷의 서버가 패치를 받으려는데 인터넷이 안 된다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;DB 서버를 프라이빗 서브넷에 올려놓고 며칠이 지나면, 보안 패치를 받거나 외부 API를 호출해야 하는 순간이 옵니다. 지금 상태로는 라우팅 테이블에 인터넷으로 나가는 경로 자체가 없어서 요청이 그냥 멈춥니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;가장 먼저 떠오르는 방법은 &quot;프라이빗 서브넷의 라우팅 테이블에 인터넷 게이트웨이로 가는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0.0.0.0/0&lt;/code&gt; 경로를 그냥 추가하면 되지 않을까&quot;입니다. 실제로 경로를 추가하면 요청은 나갑니다. 하지만 이 순간 그 서브넷은 더 이상 &quot;프라이빗&quot;이 아닙니다 &amp;mdash; 앞서 확인한 대로 퍼블릭&amp;middot;프라이빗을 가르는 유일한 기준은 라우팅 테이블에 인터넷 게이트웨이 경로가 있는지이므로, 이 경로를 추가한 순간 그 서브넷은 정의상 퍼블릭 서브넷이 됩니다. DB 서버에 공인 IP가 없어 당장 인터넷에서 직접 접근은 못 하더라도, 서브넷 전체의 보안 경계가 흐트러지고 이후 이 서브넷에 올라오는 다른 인스턴스가 실수로 공인 IP를 받으면 그대로 인터넷에 노출됩니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;정답은 인터넷 게이트웨이 경로를 프라이빗 서브넷에 직접 끌어오는 게 아니라, 퍼블릭 서브넷에 NAT 게이트웨이를 만들고 프라이빗 서브넷의 라우팅 테이블에는 그 NAT 게이트웨이로 가는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0.0.0.0/0&lt;/code&gt; 경로만 추가하는 것입니다. 이렇게 구성하면 서브넷은 여전히 프라이빗으로 남고(인터넷 게이트웨이 직행 경로가 없으므로), DB 서버가 보내는 요청은 NAT 게이트웨이 &amp;rarr; 인터넷 게이트웨이를 거쳐 나가지만 밖에서 먼저 그 서버로 연결을 거는 것은 처음부터 불가능합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;880&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bOwuoy/dJMcadQLzAc/ksBXI06kbhwWkfZNW3kmqk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bOwuoy/dJMcadQLzAc/ksBXI06kbhwWkfZNW3kmqk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bOwuoy/dJMcadQLzAc/ksBXI06kbhwWkfZNW3kmqk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbOwuoy%2FdJMcadQLzAc%2FksBXI06kbhwWkfZNW3kmqk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;880&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;880&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 온프레미스 관리자가 자주 하는 오해&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 1. &quot;NAT 게이트웨이 하나 만들어서 여러 가용 영역이 같이 쓰면 되겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;가장 조용히 사고로 이어지는 오해입니다. 온프레미스에서 이중화 방화벽 페어 하나를 여러 랙이 공유하던 감각으로 접근하면, NAT 게이트웨이도 하나만 두고 여러 가용 영역의 프라이빗 서브넷이 전부 그걸 가리키게 구성하기 쉽습니다. 도입부 시나리오가 정확히 이 상태입니다 &amp;mdash; 웹 서버는 두 가용 영역에 나눠 오토 스케일링으로 띄워 놨는데, 두 서브넷의 라우팅 테이블이 전부 한쪽 가용 영역에 있는 NAT 게이트웨이 하나를 가리키고 있었습니다. 그 NAT 게이트웨이가 속한 가용 영역에 장애가 나자, 정작 장애가 안 난 다른 가용 영역의 서버들까지 외부 결제 API 호출이 전부 막혔습니다 &amp;mdash; 여러 가용 영역에 걸쳐 서버를 띄운 이유 자체가 무색해지는 상황입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;조치는 가용 영역마다 NAT 게이트웨이를 따로 만들고, 각 가용 영역의 프라이빗 서브넷 라우팅 테이블이 &lt;b&gt;같은 가용 영역에 있는&lt;/b&gt; NAT 게이트웨이를 가리키도록 나누는 것입니다. 당장 장애가 난 상황이라면 살아 있는 가용 영역에 새 NAT 게이트웨이를 급하게 하나 더 만들고 그쪽 라우팅 테이블만 옮겨도 되지만, 이건 임시 조치입니다. 근본적으로는 처음 설계할 때부터 &quot;가용 영역 개수만큼 NAT 게이트웨이도 만든다&quot;를 기본값으로 삼아야 합니다 &amp;mdash; 비용은 가용 영역 수만큼 늘지만(5장), 그게 애초에 멀티 AZ로 구성한 목적입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;1000&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bNTFEl/dJMcagUmdUB/kT35ac0k3yeZK1iHQ2PLvk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bNTFEl/dJMcagUmdUB/kT35ac0k3yeZK1iHQ2PLvk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bNTFEl/dJMcagUmdUB/kT35ac0k3yeZK1iHQ2PLvk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbNTFEl%2FdJMcagUmdUB%2FkT35ac0k3yeZK1iHQ2PLvk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;1000&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;1000&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 2. &quot;인터넷 게이트웨이가 있으면 방화벽 역할도 해 주겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;인터넷 게이트웨이는 라우팅과 주소 변환만 합니다. 어떤 트래픽을 들여보내고 막을지는 전혀 판단하지 않습니다. 온프레미스에서 경계 라우터에 NAT와 방화벽 규칙을 같이 걸어 두던 감각으로 접근하면, 인터넷 게이트웨이만 붙여 놓으면 트래픽 통제도 알아서 될 거라 생각하기 쉽습니다. 실제로 어떤 포트&amp;middot;프로토콜을 허용할지는 인스턴스에 붙은 보안 그룹과 서브넷에 붙은 네트워크 ACL(Access Control List &amp;mdash; 서브넷 단위로 허용&amp;middot;차단을 판단하는 접근 제어 목록)이 결정합니다 &amp;mdash; 인터넷 게이트웨이는 그 트래픽이 오갈 수 있는 통로만 열어 둘 뿐입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 3. &quot;프라이빗 서브넷 라우팅 테이블에 NAT 게이트웨이 경로를 추가하면 그 서브넷도 퍼블릭이 되는 거 아닌가&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;아닙니다. 서브넷의 퍼블릭&amp;middot;프라이빗을 가르는 기준은 오직 &lt;b&gt;인터넷 게이트웨이로 가는 직접 경로&lt;/b&gt;가 있는지입니다(3장). NAT 게이트웨이로 가는 경로는 이 기준에 해당하지 않습니다 &amp;mdash; NAT 게이트웨이 자체가 퍼블릭 서브넷에 놓여 있고(퍼블릭 타입 기준), 그 NAT 게이트웨이가 다시 인터넷 게이트웨이로 나가는 구조이지, 프라이빗 서브넷이 인터넷 게이트웨이를 직접 가리키는 게 아니기 때문입니다. 이 오해가 실제로 문제가 되는 지점은 3장 시나리오처럼 &quot;그냥 인터넷 게이트웨이 경로를 프라이빗 서브넷에 직접 추가&quot;하는 반대 방향의 실수로 이어질 때입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 4. &quot;저렴하게 EC2(Elastic Compute Cloud &amp;mdash; AWS의 가상 서버) 인스턴스 하나로 NAT 서버를 직접 만들면 되지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;가능하긴 합니다 &amp;mdash; AWS는 이를 NAT 인스턴스라고 부르고 여전히 지원합니다. 다만 권장하지는 않습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;We recommend that you use NAT gateways because they provide better availability and bandwidth and require less effort on your part to administer.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;공식 비교표에서 핵심만 추리면, 온프레미스에서 소프트웨어 라우터를 직접 굴리는 것과 상용 어플라이언스를 쓰는 것의 차이와 비슷합니다(공식 비교표는 이 외에도 네트워크 ACL&amp;middot;플로우 로그&amp;middot;타임아웃 동작 등 항목이 더 있습니다).&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;NAT 게이트웨이&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;NAT 인스턴스&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;가용성&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;가용 영역 안에서 자동 이중화&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;장애 조치(failover)를 직접 스크립트로 관리&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대역폭&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;최대 100Gbps까지 자동 확장&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;선택한 인스턴스 타입의 대역폭에 종속&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;유지보수&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS가 관리, 직접 할 일 없음&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;소프트웨어 업데이트&amp;middot;OS 패치를 직접 관리&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비용&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NAT 게이트웨이 개수&amp;middot;사용 시간&amp;middot;처리 데이터량 기준&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NAT 인스턴스 개수&amp;middot;사용 시간&amp;middot;인스턴스 타입&amp;middot;크기 기준&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;리소스에 붙일 수 있지만 NAT 게이트웨이 자체에는 불가&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NAT 인스턴스 자체에도 붙일 수 있음&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;NAT 인스턴스가 유리한 지점도 있습니다 &amp;mdash; 보안 그룹을 직접 붙일 수 있고, 포트 포워딩이나 베스천 서버(내부망 접속용 중계 서버) 용도로 함께 쓸 수 있습니다. 하지만 이중화&amp;middot;확장&amp;middot;패치를 전부 직접 관리해야 한다는 부담은 그대로 남고, AWS도 기존 NAT 인스턴스를 쓰고 있다면 NAT 게이트웨이로 옮기라고 명시적으로 권장합니다. 온프레미스에서 이미 방화벽 어플라이언스로 옮겨 온 조직이라면 이 권장 방향이 낯설지 않을 것입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 비용&amp;middot;운영 감각&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 경계 라우터&amp;middot;NAT 장비는 한 번 사서 설치하면 그 뒤로는 감가상각만 신경 쓰면 되는 자산(CAPEX, Capital Expenditure &amp;mdash; 처음에 사들여 감가상각하는 자본 지출)이었습니다. 인터넷 게이트웨이와 NAT 게이트웨이는 이 감각이 완전히 갈립니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;인터넷 게이트웨이는 그 자체로 무료입니다&lt;/b&gt; &amp;mdash; 데이터 전송 요금만 인스턴스 쪽에 별도로 붙습니다. &lt;b&gt;NAT 게이트웨이는 다릅니다.&lt;/b&gt;&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;When you provision a NAT gateway, you are charged for each hour that your NAT gateway is available and each gigabyte of data that it processes.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;만들어 두기만 해도 시간당 요금이 쌓이고, 그 위에 처리한 데이터량(GB)만큼 추가로 붙습니다. 온프레미스 감각으로는 &quot;안 쓰는 시간엔 그냥 놀고 있는 것&quot;이지만, NAT 게이트웨이는 트래픽이 없어도 떠 있는 것만으로 계속 과금됩니다. 개발&amp;middot;테스트 환경에 NAT 게이트웨이를 만들어 두고 밤새, 주말 내내 지우지 않으면 실제로 쓴 시간보다 훨씬 오래 요금이 쌓입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;데이터 처리 비용을 줄이는 방법도 공식 문서가 짚어 줍니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If your AWS resources send or receive a significant volume of traffic across Availability Zones, ensure that the resources are in the same Availability Zone as the NAT gateway. Alternatively, create a NAT gateway in each Availability Zone with resources. If most traffic through your NAT gateway is to AWS services that support interface endpoints or gateway endpoints, consider creating an interface endpoint or gateway endpoint for these services.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;리소스와 NAT 게이트웨이를 같은 가용 영역에 두거나(가용 영역마다 NAT 게이트웨이를 따로 두는 4장의 구성이 여기서도 그대로 도움이 됩니다), S3 같은 AWS 서비스로만 나가는 트래픽이라면 NAT 게이트웨이 대신 VPC 엔드포인트(6장)를 쓰는 편이 데이터 처리 비용을 줄이는 방법입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;할당량도 함께 확인해야 합니다.&lt;/b&gt; 가용 영역당 NAT 게이트웨이는 기본 5개(상향 가능), 퍼블릭 NAT 게이트웨이 하나에 붙일 수 있는 탄력적 IP는 기본 2개(최대 8개까지 상향 가능)입니다. 가용 영역마다 NAT 게이트웨이를 나눠 만드는 구성(4장)을 계획할 때 이 숫자를 미리 알아 두면 나중에 할당량 초과로 막히는 일을 줄일 수 있습니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 관련 개념&lt;/h2&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;VPC&amp;middot;서브넷&amp;middot;라우팅 테이블&lt;/b&gt; &amp;mdash; 인터넷 게이트웨이&amp;middot;NAT 게이트웨이가 실제로 트래픽을 흘려보내려면 라우팅 테이블에 경로가 있어야 한다. 퍼블릭&amp;middot;프라이빗 서브넷을 가르는 기준도 이 라우팅 테이블에 있다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;보안 그룹&amp;middot;네트워크 ACL&lt;/b&gt; &amp;mdash; 인터넷 게이트웨이&amp;middot;NAT 게이트웨이가 통로를 열어 줘도, 실제로 어떤 트래픽을 허용할지는 이 둘이 결정한다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;VPC 엔드포인트&lt;/b&gt; &amp;mdash; 프라이빗 서브넷에서 S3&amp;middot;DynamoDB 같은 AWS 서비스에 접근할 때, NAT 게이트웨이를 거치지 않고 AWS 네트워크 안에서 바로 연결하는 방법. 데이터 처리 비용을 줄이는 대안이 된다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;전송 게이트웨이&amp;middot;Site-to-Site VPN&lt;/b&gt; &amp;mdash; 프라이빗 NAT 게이트웨이가 온프레미스 네트워크나 다른 VPC로 나갈 때 실제로 경유하는 하이브리드 연결 컴포넌트.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;탄력적 IP(Elastic IP)&lt;/b&gt; &amp;mdash; 퍼블릭 NAT 게이트웨이와 퍼블릭 서브넷의 인스턴스가 인터넷과 통신할 때 쓰는 고정 공인 IP.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;7. 한눈에 정리&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;확인할 것&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;방향&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷 게이트웨이는 양방향(인바운드 가능), NAT 게이트웨이는 아웃바운드 전용&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;위치&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷 게이트웨이는 VPC에 연결, NAT 게이트웨이는 퍼블릭 서브넷 안에 생성(퍼블릭 타입 기준)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;개수 제한&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷 게이트웨이는 VPC당 1개, NAT 게이트웨이는 가용 영역당 기본 5개&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;가용 영역&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷 게이트웨이는 특정 가용 영역에 종속되지 않음, NAT 게이트웨이는 특정 가용 영역에 종속 &amp;mdash; 이중화하려면 가용 영역마다 따로 만들어야 함&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;퍼블릭/프라이빗 서브넷 결정&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;라우팅 테이블에 인터넷 게이트웨이로 가는 직접 경로가 있는지만으로 결정, NAT 게이트웨이 경로는 무관&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NAT 게이트웨이는 자체적으로 보안 그룹을 붙일 수 없음(리소스 쪽에 붙임, NAT 인스턴스는 예외), 인터넷 게이트웨이는 애초에 트래픽 허용 여부를 판단하지 않음&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비용&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷 게이트웨이는 무료(데이터 전송료만), NAT 게이트웨이는 시간당+처리 GB당 유료&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대역폭&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NAT 게이트웨이는 5Gbps에서 100Gbps까지 자동 확장, 초당 백만~천만 패킷&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;연결 수&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NAT 게이트웨이 IP 하나당 목적지 하나에 55,000 동시 연결&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대안&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;NAT 인스턴스도 가능하지만 AWS는 관리 부담 때문에 NAT 게이트웨이를 권장&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/VPC-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EC%82%AC%EB%82%B4%EB%A7%9D-%EC%84%A4%EA%B3%84-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B0%80%EC%83%81-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC&quot;&gt;사내망 설계 감각으로 읽는 가상 네트워크&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/%EB%B3%B4%EC%95%88-%EA%B7%B8%EB%A3%B9-vs-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC-ACL-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EB%B0%A9%ED%99%94%EB%B2%BD-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EC%9D%B4%EC%A4%91-%EB%B0%A9%EC%96%B4%EC%84%A0&quot;&gt;나가는 트래픽을 어디서 막는가&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/ping-mtr-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%ED%95%91%EC%9D%80-%EC%A0%95%EC%83%81%EC%9D%B8%EB%8D%B0-%EC%84%9C%EB%B9%84%EC%8A%A4%EB%8A%94-%EC%97%AC%EC%A0%84%ED%9E%88-%EC%95%88-%EB%90%A9%EB%8B%88%EB%8B%A4&quot;&gt;실제로 밖으로 나가는지 확인하는 법&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>AWS/이게 뭐야?</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/87</guid>
      <comments>https://wowpanel.tistory.com/entry/NAT-%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4%C2%B7%EC%9D%B8%ED%84%B0%EB%84%B7-%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EA%B2%BD%EA%B3%84-%EB%9D%BC%EC%9A%B0%ED%84%B0-%ED%95%98%EB%82%98%EA%B0%80-%EB%91%98%EB%A1%9C-%EA%B0%88%EB%9D%BC%EC%A7%84-%EC%9D%B4%EC%9C%A0#entry87comment</comments>
      <pubDate>Tue, 1 Sep 2026 22:25:25 +0900</pubDate>
    </item>
    <item>
      <title>보안 그룹 vs 네트워크 ACL &amp;mdash; 온프레미스 방화벽 감각으로 읽는 AWS의 이중 방어선</title>
      <link>https://wowpanel.tistory.com/entry/%EB%B3%B4%EC%95%88-%EA%B7%B8%EB%A3%B9-vs-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC-ACL-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EB%B0%A9%ED%99%94%EB%B2%BD-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EC%9D%B4%EC%A4%91-%EB%B0%A9%EC%96%B4%EC%84%A0</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 서버로 들어오는 트래픽을 막을 때는 보통 두 계층을 씁니다. 코어 스위치나 경계 라우터에 걸어 둔 ACL(Access Control List, 접근 제어 목록 &amp;mdash; 순서대로 평가되는 허용&amp;middot;차단 규칙의 목록)이 서브넷 단위로 큰 그물을 치고, 그 안쪽에서는 서버마다 개별 방화벽(iptables, Windows 방화벽)이 세부 규칙을 다시 겁니다. AWS도 구조는 똑같이 두 계층입니다 &amp;mdash; 인스턴스에 붙는 &lt;b&gt;보안 그룹&lt;/b&gt;과 서브넷에 붙는 &lt;b&gt;네트워크 ACL&lt;/b&gt;입니다. 문제는 이름이 비슷해서 &quot;결국 같은 방화벽 규칙 아닌가&quot;라고 생각하기 쉽다는 겁니다. 실제로는 트래픽을 판단하는 방식 자체가 다르고, 이 차이를 모르고 넘어가면 규칙을 분명히 추가했는데도 연결이 안 되는 상황을 만납니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 경계 방화벽과 서버 방화벽을 함께 운영해 온 네트워크 관리자가 로드밸런서 뒤 웹 서버 서브넷에 네트워크 ACL을 새로 만든다. 인바운드 규칙에 HTTPS(443) 허용을 추가하고 &quot;이제 됐다&quot;며 넘어갔는데, 로드밸런서의 헬스체크가 계속 비정상(unhealthy)으로 뜬다. 보안 그룹도, 웹 서버 애플리케이션도 멀쩡한데 왜 응답이 안 돌아오는지 알 수 없는 상황에서 시작한다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글은 실제 AWS 콘솔 화면이나 CLI 실행 결과를 캡처하지 않습니다. 보안 그룹과 네트워크 ACL의 동작 방식, 기본 규칙, 규칙 평가 순서, 할당량(quota)처럼 이 글이 다루는 사실 하나하나는 전부 AWS 공식 문서(Amazon VPC User Guide)를 직접 열어 원문을 대조한 것입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;보안 그룹과 네트워크 ACL이 정확히 뭔가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;온프레미스 대응표&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;실무에서 반드시 알아야 하는 것&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;온프레미스 관리자가 자주 하는 오해&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;비용&amp;middot;운영 감각&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;관련 개념&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s7&quot;&gt;한눈에 정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. 보안 그룹과 네트워크 ACL이 정확히 뭔가&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;보안 그룹&lt;/b&gt;은 인스턴스(정확히는 인스턴스에 붙은 네트워크 인터페이스) 단위로 붙는 방화벽입니다. AWS 공식 문서는 이렇게 정의합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A security group controls the traffic that is allowed to reach and leave the resources that it is associated with. For example, after you associate a security group with an EC2 instance, it controls the inbound and outbound traffic for the instance.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;네트워크 ACL&lt;/b&gt;은 서브넷 단위로 붙는 방화벽입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A network access control list (ACL) allows or denies specific inbound or outbound traffic at the subnet level.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;여기까지는 &quot;트래픽을 제어하는 규칙&quot;이라는 점에서 같아 보입니다. 하지만 AWS 공식 문서가 둘을 나란히 비교한 표를 보면 완전히 다른 원칙으로 동작한다는 것이 드러납니다. 원문 표(Compare security groups and network ACLs)를 그대로 옮기면 이렇습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;특성&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;보안 그룹&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;네트워크 ACL&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Level of operation&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Instance level&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Subnet level&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Scope&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Applies to all instances associated with the security group&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Applies to all instances in the associated subnets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Rule type&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Allow rules only&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Allow and deny rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Rule evaluation&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Evaluates all rules before deciding whether to allow traffic&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Evaluates rules in ascending order until a match for the traffic is found&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Return traffic&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Automatically allowed (stateful)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Must be explicitly allowed (stateless)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;레벨(인스턴스 대 서브넷)만 다른 게 아니라, 규칙을 판단하는 방식 자체가 다릅니다. 이 다섯 줄이 이 글 전체를 관통하는 축입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2000&quot; data-origin-height=&quot;1160&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/ccH4tn/dJMcaf8QigB/pNpf2DPzKP5pfwZnKbHLr0/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/ccH4tn/dJMcaf8QigB/pNpf2DPzKP5pfwZnKbHLr0/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/ccH4tn/dJMcaf8QigB/pNpf2DPzKP5pfwZnKbHLr0/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FccH4tn%2FdJMcaf8QigB%2FpNpf2DPzKP5pfwZnKbHLr0%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2000&quot; height=&quot;1160&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2000&quot; data-origin-height=&quot;1160&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 온프레미스 대응표&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 물건이 아니라 &quot;가장 가까운 것&quot;입니다.&lt;/b&gt; 대응시켜 놓고 다른 점을 무시하면 3&amp;middot;4장에서 다루는 오해로 바로 이어집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;온프레미스&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;AWS&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;같은 점&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;다른 점&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서버별 개별 방화벽(iptables&amp;middot;Windows 방화벽)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;리소스 단위로 트래픽 제어&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;상태 유지&amp;middot;allow만 가능(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;경계 라우터&amp;middot;코어 스위치의 ACL&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;네트워크 ACL&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서브넷 단위로 트래픽 제어&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;무상태&amp;middot;allow&amp;middot;deny 둘 다(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;규칙을 위에서 아래로, 첫 매치 적용&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;네트워크 ACL의 규칙 번호 순 평가&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;순서가 판단에 영향을 준다&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹은 순서 개념이 없다(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;방화벽 그룹&amp;middot;객체 이름으로 소스 지정&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹을 소스로 참조&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;재사용 가능한 단위로 규칙 묶기&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IP 대신 보안 그룹 ID로 지정(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;경계 방화벽을 2차 방어선으로 두는 구성&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;네트워크 ACL&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서브넷 전체를 감싸는 굵은 그물&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹이 주 방어선이다(4장)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 실무에서 반드시 알아야 하는 것&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;상태 유지(보안 그룹)와 무상태(네트워크 ACL)의 실제 차이&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;보안 그룹은 요청을 보낸 트래픽의 응답을 자동으로 통과시킵니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Security groups are stateful. For example, if you send a request from an instance, the response traffic for that request is allowed to reach the instance regardless of the inbound security group rules. Responses to allowed inbound traffic are allowed to leave the instance, regardless of the outbound rules.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;네트워크 ACL은 이 자동 허용이 없습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;NACLs are stateless, which means that information about previously sent or received traffic is not saved. If, for example, you create a NACL rule to allow specific inbound traffic to a subnet, responses to that traffic are not automatically allowed.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;즉 보안 그룹에서는 인바운드 443을 허용하면 그 요청에 대한 응답은 아웃바운드 규칙과 무관하게 자동으로 나갑니다. 네트워크 ACL에서는 인바운드 443을 허용해도, &lt;b&gt;그 응답이 나가는 아웃바운드 트래픽을 별도 규칙으로 또 허용해야 합니다.&lt;/b&gt; 이때 응답은 443이 아니라 클라이언트가 연결을 시작할 때 임의로 고른 임시 포트(ephemeral port)로 돌아오므로, 이 포트 범위를 아웃바운드에 열어 둬야 합니다. AWS 공식 문서는 실무 대응을 이렇게 안내합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;In practice, to cover the different types of clients that might initiate traffic to public-facing instances in your VPC, you can open ephemeral ports 1024-65535.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2040&quot; data-origin-height=&quot;960&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/chJ50R/dJMcabyEOVH/VUiOEypRKe6973DNnFTMmk/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/chJ50R/dJMcabyEOVH/VUiOEypRKe6973DNnFTMmk/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/chJ50R/dJMcabyEOVH/VUiOEypRKe6973DNnFTMmk/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FchJ50R%2FdJMcabyEOVH%2FVUiOEypRKe6973DNnFTMmk%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2040&quot; height=&quot;960&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2040&quot; data-origin-height=&quot;960&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;도입부 시나리오의 원인이 바로 이것입니다 &amp;mdash; 네트워크 ACL에 인바운드 443만 열고 이 아웃바운드 임시 포트 범위를 안 열면, 요청은 서버까지 도달하지만 응답이 나가지 못해 로드밸런서 입장에서는 타임아웃으로 보입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;네트워크 ACL은 번호 순서대로 평가하고, 첫 매치에서 멈춘다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Each rule has a number from 1 to 32766. We evaluate the rules in order, starting with the lowest numbered rule, when deciding whether allow or deny traffic. If the traffic matches a rule, the rule is applied and we do not evaluate any additional rules. We recommend that you start by creating rules in increments (for example, increments of 10 or 100) so that you can insert new rules later on, if needed.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스 방화벽에서 규칙을 위에서 아래로 읽어 내려가다 첫 매치에서 적용하던 것과 같은 방식입니다. 뒤쪽에 더 엄격한 deny 규칙을 넣어도 앞쪽 규칙에 먼저 걸리면 그 규칙으로 끝입니다. 그래서 AWS도 처음부터 규칙 번호를 10이나 100 단위로 띄워 두라고 권장합니다 &amp;mdash; 나중에 규칙 하나를 끼워 넣을 여유를 남겨 두라는 뜻입니다. 보안 그룹에는 이 순서 개념 자체가 없습니다 &amp;mdash; allow 규칙만 있고, 전체 규칙을 다 평가한 뒤 하나라도 매치되면 허용하는 방식이라 규칙을 적는 순서가 결과에 영향을 주지 않습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;보안 그룹은 소스를 다른 보안 그룹으로 지정할 수 있다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스 방화벽 규칙은 대개 IP 대역이나 서브넷을 소스로 씁니다. 보안 그룹은 IP 대신 다른 보안 그룹의 ID를 소스로 지정할 수 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;When you specify a security group as the source or destination for a rule, the rule affects all instances that are associated with the security groups. The instances can communicate in the specified direction, using the private IP addresses of the instances, over the specified protocol and port.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서가 드는 예시가 실무에서 그대로 반복되는 3계층 구성입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Add rules to the load balancer security group to allow HTTP and HTTPS traffic from the internet... Add rules to the security group for the web servers to allow HTTP and HTTPS traffic only from the load balancer. The source is the security group for the load balancer. Add rules to the security group for the database servers to allow database requests from the web servers. The source is the security group for the web servers.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;로드밸런서용, 웹 서버용, DB 서버용 보안 그룹을 각각 만들고, 뒤 계층의 인바운드 규칙 소스로 앞 계층의 보안 그룹 ID를 지정하는 방식입니다. 인스턴스가 늘어나거나 교체돼 IP가 바뀌어도 규칙을 다시 고칠 필요가 없습니다 &amp;mdash; 그 보안 그룹에 속한 인스턴스라는 사실만으로 규칙이 적용됩니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;서브넷과 네트워크 ACL은 1대1, 네트워크 ACL과 서브넷은 1대다&lt;/h3&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Each subnet in your VPC must be associated with a network ACL. If you don't explicitly associate a subnet with a network ACL, the subnet is automatically associated with the default network ACL.&quot;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&quot;You can associate a network ACL with multiple subnets. However, a subnet can be associated with only one network ACL at a time. When you associate a network ACL with a subnet, the previous association is removed.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;서브넷 하나는 항상 네트워크 ACL 하나에만 연결됩니다(따로 지정하지 않으면 기본 네트워크 ACL이 자동으로 연결됩니다) &amp;mdash; 두 개를 동시에 걸어 놓을 수 없습니다. 반대로 네트워크 ACL 하나는 여러 서브넷에 동시에 연결할 수 있습니다. 보안 그룹은 이 제약이 없습니다 &amp;mdash; 인스턴스 하나에 보안 그룹을 여러 개 붙일 수 있고, 그 규칙들은 합쳐져서 하나의 허용 목록처럼 동작합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 온프레미스 방화벽 규칙표를 그대로 옮긴다면&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;방화벽 규칙표에 &quot;로드밸런서 &amp;rarr; 웹 서버(80&amp;middot;443)&quot;, &quot;웹 서버 &amp;rarr; DB 서버(3306)&quot;처럼 계층별 소스&amp;middot;목적지가 IP 대역으로 적혀 있는 조직이 AWS로 전환한다고 가정합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;계층마다 보안 그룹을 하나씩 만드는 것이 첫 단계입니다. 로드밸런서용 보안 그룹, 웹 서버용 보안 그룹, DB 서버용 보안 그룹을 따로 만들고, 각 인스턴스는 자기 계층의 보안 그룹만 붙입니다. 그다음 규칙표의 소스를 IP 대역이 아니라 앞 계층의 보안 그룹 ID로 바꿔 씁니다 &amp;mdash; 웹 서버 보안 그룹의 인바운드 소스는 &quot;로드밸런서가 있는 서브넷 대역&quot;이 아니라 &quot;로드밸런서 보안 그룹&quot; 자체입니다. DB 서버 보안 그룹도 마찬가지로 &quot;웹 서버가 있는 서브넷 대역&quot;이 아니라 &quot;웹 서버 보안 그룹&quot;을 소스로 씁니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이렇게 옮기면 웹 서버 대수가 늘어나거나 오토 스케일링으로 인스턴스가 계속 교체돼도 규칙표를 다시 손댈 필요가 없습니다. IP 대역으로 규칙을 짜 두면 서브넷을 나중에 넓히거나 인스턴스를 다른 서브넷으로 옮길 때마다 방화벽 규칙까지 같이 손봐야 하지만, 보안 그룹 참조는 &quot;그 그룹에 속해 있는가&quot;만 보므로 이런 변경에 영향을 받지 않습니다. 네트워크 ACL은 이 참조 방식을 지원하지 않습니다 &amp;mdash; 서브넷 단위로만 걸리므로, 규칙표의 서브넷 경계에 해당하는 부분(예: 웹 서버 서브넷과 DB 서버 서브넷 사이의 큰 틀)만 네트워크 ACL로 옮기고, 계층별 세부 규칙은 보안 그룹으로 옮기는 것이 실무에서 맞는 역할 분담입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;840&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/mJcWL/dJMcafA7xHA/gwgnXwPmYDU376XmZxeKDK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/mJcWL/dJMcafA7xHA/gwgnXwPmYDU376XmZxeKDK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/mJcWL/dJMcafA7xHA/gwgnXwPmYDU376XmZxeKDK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FmJcWL%2FdJMcafA7xHA%2FgwgnXwPmYDU376XmZxeKDK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2080&quot; height=&quot;840&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;2080&quot; data-origin-height=&quot;840&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 온프레미스 관리자가 자주 하는 오해&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 1. &quot;네트워크 ACL에서 인바운드만 열면 그 트래픽은 다 처리된 것이다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;가장 흔하고 가장 조용히 사고로 이어지는 오해입니다. 네트워크 ACL은 무상태라 인바운드를 허용해도 그 응답이 나가는 아웃바운드는 별도로 열어야 합니다(3장). 인바운드 443만 열고 넘어가면, 요청은 서버까지 도달해도 응답이 못 나가 클라이언트는 그냥 연결이 걸린 것처럼 보입니다. 도입부 시나리오의 로드밸런서 헬스체크 실패가 정확히 이 패턴이고, AWS 공식 문서도 이 경우를 별도로 경고합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;With Elastic Load Balancing, if the subnet for your backend instances has a network ACL in which you've added a deny rule for all traffic with a source of either 0.0.0.0/0 or the subnet's CIDR, your load balancer can't carry out health checks on the instances.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;여기서 CIDR(Classless Inter-Domain Routing &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;10.0.0.0/24&lt;/code&gt;처럼 IP 대역의 범위를 표기하는 방식)은 서브넷 전체의 IP 대역을 가리킵니다. 원인이 애플리케이션이나 보안 그룹이 아니라 네트워크 ACL의 아웃바운드 규칙 누락이라는 것을 모르면, 정작 문제 없는 곳들을 계속 확인하게 됩니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 2. &quot;규칙을 다 확인해서 제일 엄격한 쪽으로 결정되겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;네트워크 ACL은 번호가 낮은 규칙부터 순서대로 보다가 &lt;b&gt;첫 매치에서 즉시 멈춥니다&lt;/b&gt;(3장). 뒤쪽에 더 엄격한 deny 규칙을 추가해도 앞쪽에 이미 걸리는 allow 규칙이 있으면 그 deny는 평가조차 되지 않습니다. 반대로 보안 그룹은 규칙 순서라는 개념 자체가 없습니다 &amp;mdash; allow 규칙만 있고 전체를 다 본 뒤 하나라도 매치되면 허용하는 방식이라, &quot;순서를 신경 써야 하는가&quot;라는 질문 자체가 네트워크 ACL에만 해당합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 3. &quot;보안 그룹으로 특정 IP를 차단할 수 있다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;불가능합니다. 보안 그룹 규칙 기본 원칙은 이렇게 명시돼 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You can specify allow rules, but not deny rules.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;특정 IP를 명시적으로 막고 싶다면 보안 그룹이 아니라 네트워크 ACL의 deny 규칙을 써야 합니다. 보안 그룹만으로 &quot;이 IP만 빼고 전부 허용&quot;하는 규칙은 만들 수 없습니다 &amp;mdash; allow 목록에 없으면 자동으로 막히는 방식이지, 명시적으로 차단하는 방식이 아닙니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 4. &quot;기본 보안 그룹이 마음에 안 들면 지우고 새로 만들면 된다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;기본 보안 그룹은 삭제할 수 없습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You can't delete a default security group. If you try to delete a default security group, we return the following error code: Client.CannotDelete.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;규칙은 자유롭게 고칠 수 있지만, 그룹 자체는 항상 남아 있습니다. 그리고 새로 만든 인스턴스에 보안 그룹을 따로 지정하지 않으면 이 기본 보안 그룹이 자동으로 붙습니다 &amp;mdash; 기본 보안 그룹의 인바운드 기본 규칙은 &quot;자기 자신을 소스로 하는 전체 허용&quot;(같은 기본 보안 그룹에 속한 인스턴스끼리는 서로 통신 가능)이라, 인터넷이나 다른 보안 그룹으로부터의 트래픽은 별도로 열어 주기 전까지는 들어오지 않습니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 5. &quot;네트워크 ACL만 촘촘하게 잠그면 보안 그룹은 대충 열어도 된다&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS의 권장 방향은 반대입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Use security groups as the primary mechanism for controlling network access to your VPCs. When necessary, use network ACLs to provide stateless, coarse-grain network control. Security groups are more versatile than network ACLs, due to their ability to perform stateful packet filtering and create rules that reference other security groups. Network ACLs can be effective as a secondary control (for example, to deny a specific subset of traffic) or as high-level subnet guard rails.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;보안 그룹을 주 방어선으로 세밀하게 관리하고, 네트워크 ACL은 서브넷 전체를 감싸는 굵은 보조 그물(2차 방어선)로 쓰는 것이 AWS가 명시하는 역할 분담입니다. 온프레미스에서 경계 방화벽 하나만 촘촘히 관리하고 서버 방화벽은 느슨하게 두던 구성을 그대로 옮기면, AWS가 권장하는 방향과 정반대로 가게 됩니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 비용&amp;middot;운영 감각&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 방화벽 장비를 늘리거나 정책을 세분화할 때마다 라이선스&amp;middot;성능 비용을 신경 써야 합니다. 보안 그룹과 네트워크 ACL은 이 감각과 다릅니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;둘 다 그 자체로는 무료입니다.&lt;/b&gt;&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;There is no additional charge for using security groups.&quot;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&quot;There is no additional charge for using network ACLs.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;몇 개를 만들든, 규칙을 얼마나 세분화하든 추가 요금이 붙지 않습니다. 다만 &lt;b&gt;무제한은 아닙니다&lt;/b&gt; &amp;mdash; 할당량(quota)이 있습니다. 보안 그룹 하나에는 인바운드&amp;middot;아웃바운드 각각 최대 60개 규칙(계정 신청으로 상향 가능), 네트워크 인터페이스 하나에는 최대 5개(최대 16개까지 상향 가능)의 보안 그룹만 붙일 수 있습니다. 네트워크 ACL 하나에는 인바운드&amp;middot;아웃바운드 각각 최대 20개 규칙(상향 시 최대 40개)이 기본값입니다. 규칙이 갑자기 안 먹히거나 인스턴스에 보안 그룹을 더 못 붙이는 상황을 만나면, 애플리케이션이나 설정 실수를 의심하기 전에 이 할당량부터 확인하는 것이 순서입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;운영 방식도 온프레미스와 다릅니다.&lt;/b&gt; 서버 방화벽은 보통 서버 하나하나에 규칙을 다시 적용해야 하지만, 보안 그룹은 규칙을 한 번 고치면 그 보안 그룹이 붙은 모든 리소스에 즉시 반영됩니다 &amp;mdash; 인스턴스가 수십, 수백 대여도 규칙 변경은 한 곳에서 끝납니다. 네트워크 ACL도 마찬가지로 서브넷에 연결해 두면 그 서브넷의 모든 인스턴스에 일괄 적용됩니다. 방화벽 정책을 서버마다 따로 배포&amp;middot;확인하던 온프레미스 운영 절차가, AWS에서는 &quot;보안 그룹&amp;middot;네트워크 ACL 규칙 하나를 고치는 것&quot;으로 단순해집니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 관련 개념&lt;/h2&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;VPC&amp;middot;서브넷&amp;middot;라우팅 테이블&lt;/b&gt; &amp;mdash; 보안 그룹과 네트워크 ACL이 동작하는 무대. 서브넷의 퍼블릭&amp;middot;프라이빗 구분, CIDR 블록 규칙은 별도로 다룬다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;NAT 게이트웨이&amp;middot;인터넷 게이트웨이&lt;/b&gt; &amp;mdash; 보안 그룹&amp;middot;네트워크 ACL이 트래픽을 허용해도, 그 트래픽이 인터넷과 오가려면 이 게이트웨이를 통한 경로가 라우팅 테이블에 있어야 한다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;ALB&amp;middot;NLB&lt;/b&gt; &amp;mdash; 로드밸런서도 자체 보안 그룹을 갖는 리소스다. 헬스체크 트래픽이 백엔드 인스턴스의 보안 그룹&amp;middot;네트워크 ACL을 통과해야 정상 동작한다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AWS Network Firewall&lt;/b&gt; &amp;mdash; 보안 그룹&amp;middot;네트워크 ACL보다 더 정교한 트래픽 검사(침입 탐지&amp;middot;방지 등)가 필요할 때 쓰는 별도 서비스.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Reachability Analyzer&lt;/b&gt; &amp;mdash; 두 리소스 사이의 연결이 왜 막히는지(라우팅&amp;middot;보안 그룹&amp;middot;네트워크 ACL 중 어디서 막히는지) 정적으로 분석해 주는 진단 도구.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;IAM&lt;/b&gt; &amp;mdash; 누가 보안 그룹&amp;middot;네트워크 ACL 규칙을 만들고 고칠 수 있는지를 통제하는 권한 체계.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;7. 한눈에 정리&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;확인할 것&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;적용 레벨&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹은 인스턴스, 네트워크 ACL은 서브넷&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;규칙 종류&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹은 allow만, 네트워크 ACL은 allow&amp;middot;deny 둘 다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;평가 방식&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹은 전체 규칙 평가, 네트워크 ACL은 번호 순 평가 후 첫 매치에서 중단&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;리턴 트래픽&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹은 자동 허용(상태 유지), 네트워크 ACL은 별도로 허용해야 함(무상태)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;소스 지정&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹은 다른 보안 그룹 ID를 소스로 참조 가능&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서브넷 연결&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서브넷 하나는 네트워크 ACL 하나에만 연결(미지정 시 기본 네트워크 ACL 자동 연결)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본값&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;새 보안 그룹은 인바운드 없음&amp;middot;아웃바운드 전체 허용, 새 커스텀 네트워크 ACL은 인바운드&amp;middot;아웃바운드 전체 거부&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본 보안 그룹&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;삭제 불가, 규칙 수정만 가능&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;비용&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;둘 다 무료, 다만 규칙 개수&amp;middot;연결 개수에 할당량 있음&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;AWS 권장&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹을 주 방어선, 네트워크 ACL을 보조(2차) 방어선으로&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/iptables-firewalld-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EA%B1%B0%EB%B6%80refused%EC%99%80-%EB%AC%B4%EC%9D%91%EB%8B%B5timeout%EC%9D%80-%EB%8B%A4%EB%A5%B8-%EC%9D%B4%EC%95%BC%EA%B8%B0%EC%9E%85%EB%8B%88%EB%8B%A4&quot;&gt;리눅스에서 같은 판단을 어떻게 했는지&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/VPC-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EC%82%AC%EB%82%B4%EB%A7%9D-%EC%84%A4%EA%B3%84-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B0%80%EC%83%81-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC&quot;&gt;두 겹 방화벽이 놓이는 네트워크 구조&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/ss-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EC%84%9C%EB%B2%84%EB%8A%94-%EB%96%B4%EB%8A%94%EB%8D%B0-%EC%97%B0%EA%B2%B0%EC%9D%B4-%EC%95%88-%EB%90%A9%EB%8B%88%EB%8B%A4&quot;&gt;열었다고 생각한 포트가 실제로 열렸는지&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/%EB%A6%AC%EB%88%85%EC%8A%A4-%EB%B0%A9%ED%99%94%EB%B2%BD-%ED%99%95%EC%9D%B8-Top-10-%E2%80%94-firewalld%C2%B7%ED%8F%AC%ED%8A%B8-%EB%B3%80%EC%88%98%EB%A7%8C-%EB%B0%94%EA%BF%94-%EA%B7%B8%EB%8C%80%EB%A1%9C-%EC%93%B0%EB%8A%94-%EB%AA%85%EB%A0%B9&quot;&gt;방화벽을 확인하는 리눅스 명령 10개 모음&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>AWS/이게 뭐야?</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/86</guid>
      <comments>https://wowpanel.tistory.com/entry/%EB%B3%B4%EC%95%88-%EA%B7%B8%EB%A3%B9-vs-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC-ACL-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EB%B0%A9%ED%99%94%EB%B2%BD-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EC%9D%B4%EC%A4%91-%EB%B0%A9%EC%96%B4%EC%84%A0#entry86comment</comments>
      <pubDate>Tue, 1 Sep 2026 00:17:03 +0900</pubDate>
    </item>
    <item>
      <title>nohup / tmux 완벽 정리 &amp;mdash; SSH가 끊기면 왜 백그라우느 작업까지 같이 죽는가</title>
      <link>https://wowpanel.tistory.com/entry/nohup-tmux-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-SSH%EA%B0%80-%EB%81%8A%EA%B8%B0%EB%A9%B4-%EC%99%9C-%EB%B0%B1%EA%B7%B8%EB%9D%BC%EC%9A%B0%EB%8A%90-%EC%9E%91%EC%97%85%EA%B9%8C%EC%A7%80-%EA%B0%99%EC%9D%B4-%EC%A3%BD%EB%8A%94%EA%B0%80</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;장시간 배포 스크립트를 백그라운드(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&lt;/code&gt;)로 돌려놓고 노트북을 덮었는데, 다시 접속해 보니 절반만 끝나 있습니다. 이 글은 그 이유를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man bash&lt;/code&gt;의 신호 처리 규칙으로 정확히 확인하고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;과 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;가 그 문제를 서로 다른 방식으로 푸는 이유를 봅니다. 모든 출력은 Rocky Linux 9.7 &amp;middot; GNU bash 5.1.8 &amp;middot; coreutils 8.32 &amp;middot; tmux 3.2a에서 실행해서 그대로 붙였습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;금요일 저녁, 배포 서버.&lt;/b&gt; 새 버전 배포 스크립트가 실행에 시간이 좀 걸립니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;① 터미널에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;deploy.sh &amp;amp;&lt;/code&gt;로 띄워 놓고 자리를 비웠습니다.&lt;/b&gt; 노트북이 잠들었다가 VPN이 끊겼습니다. 다시 접속해 로그를 보니 &lt;b&gt;중간까지만 있습니다.&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;② &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;을 걸었다고 알고 있던 동료의 스크립트도 어느 파이프라인에서는 중간에 끊깁니다.&lt;/b&gt; &quot;분명 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;을 붙였는데요&quot;라는 말과 실제 로그가 안 맞습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;③ 급한 대로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Ctrl+Z&lt;/code&gt;로 멈췄다가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;bg&lt;/code&gt;로 백그라운드에 보내고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;까지 걸었는데도, 자동화 스크립트 안에서 실행한 것은 여전히 접속이 끊기면 죽습니다.&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;④ &quot;그냥 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 쓰세요&quot;라는 조언을 들었는데, 정작 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 서버 프로세스 자체가 죽었던 날엔 그 세션도 통째로 사라져 있습니다.&lt;/b&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;../리눅스%2032%20-%20ssh&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;32편&lt;/a&gt;(ssh)은 접속이 &lt;b&gt;안 되는&lt;/b&gt; 문제를 다뤘습니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Connection refused&lt;/code&gt;(즉시)와 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;timed out&lt;/code&gt;(대기)이 뜨는 순간을 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-vv&lt;/code&gt;로 구분했습니다. 이 글은 그 바로 다음 문제입니다: &lt;b&gt;어렵게 접속해서 띄운 작업이, 그 접속이 끊기는 순간 같이 죽는 문제&lt;/b&gt;입니다. 위 네 가지가 겉으로는 전부 &quot;백그라운드로 돌렸는데 죽었다&quot;는 같은 증상이지만, 원인은 &lt;b&gt;신호 하나(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;)가 누구에게 어떻게 전달되는가&lt;/b&gt;로 갈립니다 &amp;mdash; ①②는 2~3장에서, ③은 시나리오 3에서, ④는 함정 5에서 각각 갈라 봅니다. 이 글은 그 신호를 직접 재현해서 보여주는 데서 시작합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;
&lt;div style=&quot;display: block; float: none; position: static; font-size: 14px; color: #6b7280; text-align: center; margin-top: 10px; line-height: 1.7; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;800&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/clS2OU/dJMcacdbRns/wFLvhTOPHUBD1R6ZLilCA1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/clS2OU/dJMcacdbRns/wFLvhTOPHUBD1R6ZLilCA1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/clS2OU/dJMcacdbRns/wFLvhTOPHUBD1R6ZLilCA1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FclS2OU%2FdJMcacdbRns%2FwFLvhTOPHUBD1R6ZLilCA1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1960&quot; height=&quot;800&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;800&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; font-size: 14px; color: #6b7280; text-align: center; margin-top: 10px; line-height: 1.7; background: transparent !important;&quot;&gt;&lt;b&gt;&quot;백그라운드로 돌렸다&quot;만으로는 안 끊깁니다.&lt;/b&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 신호 자체를 무시하게 만들고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 애초에 그 신호가 갈 세션 자체를 분리합니다 &amp;mdash; 같은 증상, 다른 처방입니다&lt;/div&gt;
&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;nohup&amp;middot;tmux가 하는 일 &amp;mdash; 30초 요약&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;기본기 &amp;mdash; SIGHUP은 누구에게, 언제 가는가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;실전 시나리오 5가지&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;함정 코너 &amp;mdash; &quot;분명히 살려놨는데&quot; 여섯 가지&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;심화 &amp;mdash; systemd 서비스라면 이 글은 안 통합니다&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;치트시트 &amp;middot; 장애 대응 5분 루틴&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. nohup&amp;middot;tmux가 하는 일 &amp;mdash; 30초 요약&lt;/h2&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt; = 프로세스가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 무시하게 만드는 래퍼. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; = 세션 자체를 터미널 접속과 분리된 별도 서버 프로세스로 옮기는 다중화 도구.&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이름부터 이미 답을 담고 있습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;nohup&amp;nbsp;&amp;nbsp;= no + hangup&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;끊김을 무시한다&quot;&lt;br /&gt;tmux&amp;nbsp;&amp;nbsp;&amp;nbsp;= terminal multiplexer&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;터미널을 여러 개로 나눈다&quot;&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man nohup&lt;/code&gt; NAME 절 그대로입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;nohup - run a command immune to hangups, with output to a non-tty&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man nohup&lt;/code&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt; NAME&amp;middot;DESCRIPTION 절입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;tmux &amp;mdash; terminal multiplexer... tmux may be detached from a screen and continue running in the background, then later reattached.&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;두 줄의 차이가 그대로 두 도구의 성격을 가릅니다. &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 신호 하나를 막는 아주 작은 래퍼&lt;/b&gt;이고, &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 그 자체로 서버&amp;middot;클라이언트 구조를 가진 별도의 프로그램&lt;/b&gt;입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;tmux의 시작 &amp;mdash; 2007년, &quot;터미널을 여러 개로 나누는&quot; 문제를 다시 씀&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;가 패키징하는 문서(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/usr/share/doc/tmux/CHANGES&lt;/code&gt;, EL9 baseos rpm)의 가장 오래된 항목입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;09 July 2007&quot;&lt;/b&gt; (날짜 다음 줄, 불릿 항목) &lt;b&gt;&quot;Initial import to CVS. Basic functions are working... Detaching, reattaching, creating new sessions, listing sessions work acceptably for using with shells.&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 패키지 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;CHANGES&lt;/code&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;지은이는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt; AUTHORS 절에 그대로 남아 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Nicholas Marriott &amp;lt;nicholas.marriott@gmail.com&amp;gt;&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt;, AUTHORS&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;터미널을 detach&amp;middot;reattach하는 문제 자체는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;가 처음 푼 게 아닙니다&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;CHANGES&lt;/code&gt; 곳곳에 등장하는 비교 대상인 GNU &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;screen&lt;/code&gt;이 먼저 이 자리를 차지하고 있던 도구입니다. 이 글은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;screen&lt;/code&gt;을 다루지 않지만, 지금 서버에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;screen&lt;/code&gt;이 이미 깔려 있어 익숙하다면 개념(세션&amp;middot;detach&amp;middot;reattach)은 그대로 옮겨 옵니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;왜 이 도구인가&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;상황&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;이 도구 아닌 방법&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;왜 안 되나&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;배포 스크립트를 켜 놓고 접속을 끊어야 한다&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;command &amp;amp;&lt;/code&gt;만 사용&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;2장&lt;/a&gt;에서 보듯 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&lt;/code&gt;는 같은 세션 안에 남는 것일 뿐, 세션이 끊기는 순간 함께 죽습니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;이미 돌기 시작한 대화형 작업(vim, top, REPL)을 유지한 채 다른 창을 오가고 싶다&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 신호만 막을 뿐 화면을 다시 보여주지 못합니다 &amp;mdash; 표준입력이 필요한 대화형 작업엔 못 씁니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;여러 사람이 같은 작업 화면을 같이 보면서 인수인계해야 한다&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;각자 별도로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ssh&lt;/code&gt; 접속&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;각자 접속하면 &lt;b&gt;화면이 따로&lt;/b&gt;입니다 &amp;mdash; 한쪽이 명령을 쳐도 다른 쪽엔 안 보입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 같은 세션에 여러 클라이언트가 동시에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;attach&lt;/code&gt;할 수 있어 화면을 그대로 공유하지만, 이 글은 단일 사용자 관점만 다룹니다&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;가장 단순한 형태&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;nohup 명령 [인자...] &amp;amp;&lt;br /&gt;tmux new -s 세션이름&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 기본기 &amp;mdash; SIGHUP은 누구에게, 언제 가는가&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;2.1 SIGHUP 정의&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man 7 signal&lt;/code&gt;이 번호와 정의를 함께 줍니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;SIGHUP ... Hangup detected on controlling terminal or death of controlling process&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man 7 signal&lt;/code&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;../리눅스%2011%20-%20kill&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;11편&lt;/a&gt;(kill/시그널)이 이미 확인했듯 &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;은 번호 1로, 어떤 아키텍처에서도 값이 안 바뀌는 세 신호(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;HUP 1&lt;/code&gt; &amp;middot; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;KILL 9&lt;/code&gt; &amp;middot; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;TERM 15&lt;/code&gt;) 중 하나&lt;/b&gt;입니다. 이 글은 그 신호가 실제로 언제, 누구에게 가는지를 봅니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글의 재현은 아래 준비만 마치면 전부 그대로 됩니다. 이후 나오는 모든 명령은 이 디렉터리 안에서 실행합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;mkdir -p ~/nohuplab &amp;amp;&amp;amp; cd ~/nohuplab&lt;br /&gt;[ -x ~/tmuxdoc/usr/bin/tmux ] || command -v tmux || { mkdir -p ~/tmuxdoc &amp;amp;&amp;amp; cd ~/tmuxdoc &amp;amp;&amp;amp; dnf download tmux --destdir=. -q --disablerepo='*' --enablerepo=baseos &amp;lt; /dev/null &amp;amp;&amp;amp; rpm2cpio tmux-*.rpm | cpio -idm --quiet; cd ~/nohuplab; }&lt;br /&gt;export PATH=&quot;$HOME/tmuxdoc/usr/bin:$PATH&quot;&lt;br /&gt;cat &amp;gt; ticker.sh &amp;lt;&amp;lt;'EOF'&lt;br /&gt;#!/bin/bash&lt;br /&gt;for i in $(seq 1 8); do echo &quot;tick-$i&quot;; sleep 1; done&lt;br /&gt;EOF&lt;br /&gt;chmod +x ticker.sh&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #6b7280; background: #f9fafb !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 검증 서버에는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;가 패키지로 설치돼 있지 않았습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;dnf install&lt;/code&gt;은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sudo&lt;/code&gt;가 필요해서 쓰지 않았고, 대신 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;dnf download&lt;/code&gt;로 &lt;b&gt;설치하지 않고 rpm 파일만&lt;/b&gt; 받아 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;rpm2cpio&lt;/code&gt;로 홈 안에 풀어 그 실행 파일을 직접 씁니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sudo&lt;/code&gt; 없이, 시스템 어디에도 손대지 않고 끝납니다. &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;가 이미 설치돼 있다면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;command -v tmux&lt;/code&gt;가 성공해서 이 블록은 아무것도 안 하고 넘어갑니다.&lt;/b&gt; 접속이 중간에 끊겨 새 세션에서 이어 하는 경우엔 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;export PATH=&quot;$HOME/tmuxdoc/usr/bin:$PATH&quot;&lt;/code&gt; 한 줄만 다시 치면 됩니다(다운로드는 이미 끝나 있어 다시 안 받습니다).&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ tmux -V&lt;br /&gt;tmux 3.2a&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;2.2 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&lt;/code&gt;만으로는 왜 안 되나 &amp;mdash; 커널이 직접 보내는 경로부터 봅니다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;SIGHUP이 배경 job까지 가는 경로는 사실 &lt;b&gt;둘&lt;/b&gt;입니다. ① 커널이 프로세스 그룹 전체에 직접 보내는 경로, ② 로그인 셸이 자기 job들에게 대신 재전송하는 경로(대화형 세션에만 해당 &amp;mdash; &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#sc3&quot;&gt;시나리오 3&lt;/a&gt;에서 자세히 봅니다). 여기서는 더 간단하고 항상 통하는 ①번부터 결정적으로 재현합니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;운영 서버에서 실제로 SSH 연결을 반복해서 끊는 대신(그러려면 접속을 여러 번 다시 해야 해서 재현이 무거워집니다), &lt;b&gt;터미널이 끊길 때 커널이 보내는 것과 같은 신호를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;setsid&lt;/code&gt;로 만든 별도 세션에 직접 보내서&lt;/b&gt; 재현합니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;setsid&lt;/code&gt;는 새 세션을 만들면서 그 프로세스를 자기 자신만의 새 프로세스 그룹 리더로 둡니다. 그 그룹 전체(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-&lt;/code&gt;가 붙은 숫자는 프로세스 그룹 전체를 뜻합니다)에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 보내면, 실제 접속이 끊길 때 터미널 드라이버가 그 세션에 하는 일과 같습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;$!&lt;/code&gt;가 아니라 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;echo $$ &amp;gt; outer.pgid&lt;/code&gt;로 그룹 번호를 직접 적어 둡니다&lt;/b&gt; &amp;mdash; 대화형 셸에서는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;setsid&lt;/code&gt;가 &quot;이미 그룹 리더인 프로세스&quot;를 받으면 새 자식을 하나 더 fork하고 원래 프로세스(그 PID가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;$!&lt;/code&gt;입니다)는 곧바로 끝나 버립니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;$!&lt;/code&gt;를 그대로 쓰면 이미 사라진 PID를 잡는 것이라, 신호를 보내도 아무 일도 안 일어납니다 &amp;mdash; 세션 안에서 직접 자기 PID(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;$$&lt;/code&gt;)를 적어야 정확한 번호를 잡습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ rm -f plain.pid plain.log&lt;br /&gt;$ rm -f outer.pgid&lt;br /&gt;$ setsid bash -c 'echo $$ &amp;gt; outer.pgid; sleep 60 &amp;gt; plain.log 2&amp;gt;&amp;amp;1 &amp;amp; echo $! &amp;gt; plain.pid; sleep 3' &amp;lt; /dev/null &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;$ disown&lt;br /&gt;$ sleep 1; kill -HUP -&quot;$(cat outer.pgid)&quot;; sleep 2&lt;br /&gt;$ ps -p &quot;$(cat plain.pid)&quot; -o pid=,stat=,cmd= 2&amp;gt;&amp;amp;1 || echo &quot;찾을 수 없음 &amp;mdash; 죽었습니다&quot;&lt;br /&gt;찾을 수 없음 &amp;mdash; 죽었습니다&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&lt;/code&gt;로 백그라운드에 둔 것만으로는 살아남지 못합니다.&lt;/b&gt; 이 재현은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;bash -c&lt;/code&gt;(비대화형)라서 작업 제어(job control)가 켜지지 않고, 그래서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sleep&lt;/code&gt;이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;setsid&lt;/code&gt;가 만든 셸과 &lt;b&gt;같은 프로세스 그룹에 그대로 남습니다.&lt;/b&gt; 그 그룹 전체에 보낸 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 커널이 구성원 전부에게 직접 전달하므로, 셸이 뭘 하든 상관없이 죽습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ssh 서버 '명령 &amp;amp;'&lt;/code&gt;처럼 자동화 스크립트가 원격에서 비대화형으로 배경 작업을 걸 때 정확히 이 경로를 탑니다 &amp;mdash; &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#t3&quot;&gt;함정 3&lt;/a&gt;에서 이 경로가 부르는 함정을 봅니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;
&lt;div style=&quot;display: block; float: none; position: static; font-size: 14px; color: #6b7280; text-align: center; margin-top: 10px; line-height: 1.7; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;700&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bv3Ltk/dJMcajpKhsd/LzcFaubyETCokdYXqt3HVK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bv3Ltk/dJMcajpKhsd/LzcFaubyETCokdYXqt3HVK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bv3Ltk/dJMcajpKhsd/LzcFaubyETCokdYXqt3HVK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fbv3Ltk%2FdJMcajpKhsd%2FLzcFaubyETCokdYXqt3HVK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1960&quot; height=&quot;700&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;700&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; font-size: 14px; color: #6b7280; text-align: center; margin-top: 10px; line-height: 1.7; background: transparent !important;&quot;&gt;&lt;b&gt;작업 제어가 꺼진 셸에서는 백그라운드 job이 셸과 같은 프로세스 그룹에 남습니다.&lt;/b&gt; 그 그룹 전체에 보낸 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 커널이 구성원 모두에게 직접 전달합니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 이 직접 전달 자체를 프로세스 스스로 무시하게 만듭니다&lt;/div&gt;
&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;2.3 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;이 다른 이유 &amp;mdash; 신호 자체를 무시하게 만듭니다&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ rm -f nh.pid nh.log&lt;br /&gt;$ rm -f outer.pgid&lt;br /&gt;$ setsid bash -c 'echo $$ &amp;gt; outer.pgid; nohup sleep 60 &amp;gt; nh.log 2&amp;gt;&amp;amp;1 &amp;amp; echo $! &amp;gt; nh.pid; sleep 3' &amp;lt; /dev/null &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;$ disown&lt;br /&gt;$ sleep 1; kill -HUP -&quot;$(cat outer.pgid)&quot;; sleep 2&lt;br /&gt;$ ps -p &quot;$(cat nh.pid)&quot; -o pid=,stat=,cmd=&lt;br /&gt;2673271 S&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sleep 60&lt;br /&gt;$ kill -9 &quot;$(cat nh.pid)&quot;&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 신호, 같은 프로세스 그룹인데 이번엔 살아남습니다.&lt;/b&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man nohup&lt;/code&gt;이 이유를 말해 줍니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 셸의 재전송을 피하는 게 아니라, &lt;b&gt;그 프로세스 자신이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 아예 무시하도록&lt;/b&gt; 만듭니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Run COMMAND, ignoring hangup signals.&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man nohup&lt;/code&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 차이가 이 글의 핵심입니다. &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;(&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#sc3&quot;&gt;시나리오 3&lt;/a&gt;)은 &quot;셸이 이 job에게 재전송하지 않도록&quot; 셸의 장부만 바꾸는 것이고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 &quot;이 프로세스는 애초에 그 신호를 받아도 반응하지 않는다&quot;로 프로세스 자신을 바꾸는 것입니다.&lt;/b&gt; 셸이 없어져도, 재전송 경로가 뭐든 상관없이 살아남는 쪽은 후자입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;2.4 실제 터미널 접속에는 경로가 하나 더 있습니다 &amp;mdash; 셸의 재전송&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;지금까지 재현한 것은 &lt;b&gt;작업 제어가 꺼진 셸&lt;/b&gt;(비대화형 스크립트)의 경우입니다. 독자가 실제로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ssh 서버&lt;/code&gt;로 접속해 명령을 하나씩 치는 &lt;b&gt;대화형 세션&lt;/b&gt;은 다릅니다 &amp;mdash; 그 경우엔 작업 제어가 자동으로 켜져 있어 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&lt;/code&gt;로 보낸 job이 &lt;b&gt;별도의 프로세스 그룹&lt;/b&gt;으로 옮겨지고, 그 덕분에 커널이 보내는 그룹 단위 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;(위 경로 ①)에서는 벗어납니다. 그런데도 접속이 끊기면 여전히 죽습니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man bash&lt;/code&gt; SIGNALS 절이 그 이유를 적어 둡니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The shell exits by default upon receipt of a SIGHUP. Before exiting, an interactive shell resends the SIGHUP to all jobs, running or stopped.&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man bash&lt;/code&gt;, SIGNALS&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;로그인 셸 자신이 먼저 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 받고(터미널의 세션 리더이기 때문입니다), 죽기 전에 그 신호를 자기가 띄운 job들에게 그대로 다시 보냅니다.&lt;/b&gt; 커널의 직접 전달을 피해도 셸의 재전송까지는 못 피하는 것입니다 &amp;mdash; 실제 접속 종료 실측으로 확인한 값입니다(이 재전송 여부는 접속을 실제로 강제 종료해야 드러나 결정적 재현 블록으로 신지 않았습니다). &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;이 진짜로 의미를 가지는 곳이 정확히 여기입니다 &amp;mdash; &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#sc3&quot;&gt;시나리오 3&lt;/a&gt;에서 이 경로를 자세히 봅니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;2.5 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 아예 다른 층위입니다 &amp;mdash; 세션을 서버로 옮깁니다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt; DESCRIPTION의 서버&amp;middot;클라이언트 구조를 설명하는 문단입니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;In tmux, a session is displayed on screen by a client and all sessions are managed by a single server. The server and each client are separate processes which communicate through a socket in /tmp.&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;이 신호 하나를 막는 대응이라면, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 &lt;b&gt;애초에 그 신호가 갈 대상 자체를 분리&lt;/b&gt;합니다. SSH 세션(클라이언트)이 끊겨도 &lt;b&gt;작업이 실제로 돌고 있는 곳은 별도로 계속 살아 있는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 서버 프로세스&lt;/b&gt;이기 때문에, 클라이언트 쪽 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;은 서버에 있는 작업까지 갈 방법 자체가 없습니다. 이 차이는 &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#sc5&quot;&gt;시나리오 5&lt;/a&gt;에서 프로세스 트리로 직접 확인합니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 실전 시나리오 5가지&lt;/h2&gt;
&lt;h3 id=&quot;sc1&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 1 &amp;mdash; 배포 스크립트를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&lt;/code&gt;로 띄우고 나왔는데 절반만 끝나 있다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;앞서 2장에서 이미 원인을 확인했으니, 여기서는 &lt;b&gt;정답과 그 근거를 정리&lt;/b&gt;합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ rm -f fix1.pid fix1.log&lt;br /&gt;$ rm -f outer.pgid&lt;br /&gt;$ setsid bash -c 'echo $$ &amp;gt; outer.pgid; nohup sleep 6 &amp;gt; fix1.log 2&amp;gt;&amp;amp;1 &amp;amp; echo $! &amp;gt; fix1.pid; sleep 2' &amp;lt; /dev/null &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;$ disown&lt;br /&gt;$ sleep 1; kill -HUP -&quot;$(cat outer.pgid)&quot;; sleep 1&lt;br /&gt;$ ps -p &quot;$(cat fix1.pid)&quot; -o pid=,etimes=,cmd=&lt;br /&gt;2673322&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2 sleep 6&lt;br /&gt;$ sleep 6; ps -p &quot;$(cat fix1.pid)&quot; 2&amp;gt;&amp;amp;1 || echo &quot;정상 종료(끝까지 다 돌았습니다)&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PID TTY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;TIME CMD&lt;br /&gt;정상 종료(끝까지 다 돌았습니다)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 보낸 시점(경과 2초)에도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sleep 6&lt;/code&gt;이 멀쩡히 살아 있고, 남은 시간을 다 채운 뒤(6초 뒤) 정상 종료했습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;교훈&lt;/b&gt;: &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&lt;/code&gt;는 &quot;지금 화면을 막지 않겠다&quot;는 뜻이지 &quot;이 세션과 무관해지겠다&quot;는 뜻이 아닙니다. 접속이 끊기는 순간까지 살아남아야 하는 작업이면 시작할 때부터 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;을 붙입니다 &amp;mdash; 이미 띄운 다음에 되돌리려면 &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#t3&quot;&gt;함정 3&lt;/a&gt;의 제약을 먼저 확인해야 합니다.&lt;/blockquote&gt;
&lt;h3 id=&quot;sc2&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 2 &amp;mdash; 분명 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;을 붙였는데도 로그가 중간에서 끊긴다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;순진한 시도&lt;/b&gt; &amp;mdash; 파이프라인의 첫 명령에만 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;을 붙입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ticker.sh&lt;/code&gt;는 앞서 준비한, 1초마다 한 줄씩 8초 동안 찍는 스크립트입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ rm -f pipe.log&lt;br /&gt;$ rm -f outer.pgid&lt;br /&gt;$ setsid bash -c 'echo $$ &amp;gt; outer.pgid; nohup ./ticker.sh | tee pipe.log &amp;amp; sleep 3' &amp;lt; /dev/null &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;$ disown&lt;br /&gt;$ sleep 3; kill -HUP -&quot;$(cat outer.pgid)&quot;; sleep 1&lt;br /&gt;$ cat pipe.log&lt;br /&gt;tick-1&lt;br /&gt;tick-2&lt;br /&gt;tick-3&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #dc2626; background: #fef2f2 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;8줄이 나와야 하는데 3줄에서 끊깁니다.&lt;/b&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 자기 뒤에 바로 오는 명령 하나에만 걸립니다. 파이프의 &lt;b&gt;뒤쪽 명령(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tee&lt;/code&gt;)은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;이 보호하지 않는 별도의 프로세스&lt;/b&gt;라서, 세션이 끊기면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tee&lt;/code&gt;가 먼저 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;으로 죽고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tee&lt;/code&gt;가 사라지면 앞쪽 명령도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGPIPE&lt;/code&gt;로 따라 죽습니다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;정답&lt;/b&gt; &amp;mdash; 파이프라인 전체를 하나의 명령으로 감싸서 그 전체에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;을 겁니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ rm -f pipe2.log wrap.out&lt;br /&gt;$ rm -f outer.pgid&lt;br /&gt;$ setsid bash -c 'echo $$ &amp;gt; outer.pgid; nohup bash -c &quot;./ticker.sh | tee pipe2.log&quot; &amp;gt; wrap.out 2&amp;gt;&amp;amp;1 &amp;amp; sleep 1' &amp;lt; /dev/null &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;$ disown&lt;br /&gt;$ sleep 1; kill -HUP -&quot;$(cat outer.pgid)&quot;&lt;br /&gt;$ sleep 9; cat pipe2.log&lt;br /&gt;tick-1&lt;br /&gt;tick-2&lt;br /&gt;tick-3&lt;br /&gt;tick-4&lt;br /&gt;tick-5&lt;br /&gt;tick-6&lt;br /&gt;tick-7&lt;br /&gt;tick-8&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;nohup bash -c &quot;생성 | tee 로그&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;larr; tee까지 같은 bash -c 자식이라 통째로 보호됩니다&lt;br /&gt;nohup 생성 | tee 로그&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;larr; tee는 nohup 밖의 별도 job이라 못 지킵니다&lt;/div&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;교훈&lt;/b&gt;: &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 &lt;b&gt;명령 하나&lt;/b&gt;를 감쌉니다. 파이프&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&amp;amp;&lt;/code&gt;로 이어진 다음 단계는 각자 별도의 프로세스이므로, 여러 단계를 전부 지키려면 그 전체를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;bash -c &quot;...&quot;&lt;/code&gt;로 한 덩어리로 만든 다음 그 바깥에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;을 겁니다.&lt;/blockquote&gt;
&lt;h3 id=&quot;sc3&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 3 &amp;mdash; 이미 돌고 있는 걸 백그라운드로 보내고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;까지 걸었다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Ctrl+Z&lt;/code&gt;로 멈췄던 작업을 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;bg&lt;/code&gt;로 이어 돌리고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;까지 걸어 뒀는데, &lt;b&gt;어떤 환경에서는 되고 어떤 환경에서는 안 됩니다.&lt;/b&gt; 갈리는 기준을 봅니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ rm -f d1.pid d1.log&lt;br /&gt;$ rm -f outer.pgid&lt;br /&gt;$ setsid bash -c 'echo $$ &amp;gt; outer.pgid; sleep 30 &amp;gt; d1.log 2&amp;gt;&amp;amp;1 &amp;amp; echo $! &amp;gt; d1.pid; disown -h %1; sleep 3' &amp;lt; /dev/null &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;$ disown&lt;br /&gt;$ sleep 1; kill -HUP -&quot;$(cat outer.pgid)&quot;; sleep 2&lt;br /&gt;$ ps -p &quot;$(cat d1.pid)&quot; -o pid=,stat=,cmd= 2&amp;gt;&amp;amp;1 || echo &quot;찾을 수 없음 &amp;mdash; 죽었습니다&quot;&lt;br /&gt;찾을 수 없음 &amp;mdash; 죽었습니다&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #dc2626; background: #fef2f2 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man bash&lt;/code&gt;가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown -h&lt;/code&gt;를 이렇게 정의합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If the -h option is given, each jobspec is not removed from the table, but is marked so that SIGHUP is not sent to the job if the shell receives a SIGHUP.&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man bash&lt;/code&gt;, SHELL BUILTIN COMMANDS&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&quot;셸이 그 job에게 재전송하지 않는다&quot;는 것이지, &quot;그 job이 신호 자체를 안 받는다&quot;는 게 아닙니다.&lt;/b&gt; 위 재현처럼 &lt;b&gt;작업 제어(job control)가 켜지지 않은 셸&lt;/b&gt;(스크립트로 자동화된 세션이 대표적입니다)에서는 백그라운드로 보낸 job이 셸과 &lt;b&gt;같은 프로세스 그룹에 그대로 남아&lt;/b&gt;, 커널이 그룹 전체에 보내는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 셸의 장부와 무관하게 직접 맞습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;이 지켜 주는 건 &quot;셸이 다시 보내는 것&quot;뿐이라, 애초에 셸을 거치지 않고 오는 이 경로는 못 막습니다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;실제로 터미널을 열어 명령을 하나씩 치는 대화형 세션&lt;/b&gt;은 다릅니다 &amp;mdash; 그 경우엔 작업 제어가 자동으로 켜져 있어 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&lt;/code&gt;로 보낸 job이 &lt;b&gt;별도의 프로세스 그룹&lt;/b&gt;으로 옮겨지고, 커널의 직접 신호에서 벗어납니다. 이때는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown -h&lt;/code&gt;가 실제로 보호막이 됩니다(셸이 재전송만 안 하면 되니까요) &amp;mdash; 실제 SSH 접속을 강제로 끊어(로컬 클라이언트를 죽여) 확인한 것으로, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown -h&lt;/code&gt; 없이는 죽고 걸어 두면 살아남는 것을 양쪽 다 재현했습니다. 다만 이 재현은 별도 네트워크 접속이 필요해 이 글의 결정적 재현 블록으로는 신지 않았습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;상황&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;작업 제어(job control)&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown -h&lt;/code&gt;가 막아 주는가&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;터미널에서 직접 타이핑하는 대화형 세션&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;켜짐(백그라운드 job이 별도 그룹)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;막아 줍니다 &amp;mdash; 셸의 재전송이 유일한 위협이기 때문입니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ssh 서버 '명령 &amp;amp;'&lt;/code&gt;처럼 스크립트로 보내는 비대화형 세션&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;꺼짐(job이 셸과 같은 그룹)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;b&gt;못 막습니다&lt;/b&gt; &amp;mdash; 커널이 그룹 전체에 직접 보내기 때문입니다&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;교훈&lt;/b&gt;: 자동화 스크립트에서 원격으로 백그라운드 작업을 거는 경우라면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;을 믿지 않습니다. &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 이 표의 두 상황 모두에서 통합니다&lt;/b&gt; &amp;mdash; 신호를 받는 셸이 몇 개를 거치든, 프로세스 자신이 무시하기 때문입니다.&lt;/blockquote&gt;
&lt;h3 id=&quot;sc4&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 4 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;로 아예 세션을 분리한다&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #6b7280; background: #f9fafb !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;아래부터는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-L lab34&lt;/code&gt;로 이 글 전용 소켓을 씁니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux kill-server&lt;/code&gt;는 그 소켓의 서버 &lt;b&gt;전체&lt;/b&gt;를 끕니다 &amp;mdash; 지금 이미 다른 작업으로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;를 쓰고 있다면, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-L&lt;/code&gt; 없이 그냥 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux kill-server&lt;/code&gt;를 치는 순간 &lt;b&gt;그 세션들까지 전부 죽습니다.&lt;/b&gt; 이 글의 재현이 독자의 진짜 작업에 영향을 주지 않도록 소켓 이름부터 분리합니다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ tmux -L lab34 kill-server 2&amp;gt;/dev/null; rm -f tmux_work.log&lt;br /&gt;$ tmux -L lab34 new-session -d -s deploy&lt;br /&gt;$ tmux -L lab34 send-keys -t deploy './ticker.sh &amp;gt;&amp;gt; tmux_work.log' Enter&lt;br /&gt;$ tmux -L lab34 list-sessions&lt;br /&gt;deploy: 1 windows (created Sun Aug 23 16:15:00 2026)&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;이 시점부터 접속이 끊겨도 상관없습니다.&lt;/b&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 세션 자체는 SSH 접속과 별개의 프로세스이므로, 실제로 노트북을 덮든 네트워크가 끊기든 영향이 없습니다. 8초 뒤(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ticker.sh&lt;/code&gt;가 끝날 시간)에 다시 확인합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ sleep 9&lt;br /&gt;$ tmux -L lab34 list-sessions&lt;br /&gt;deploy: 1 windows (created Sun Aug 23 16:15:00 2026)&lt;br /&gt;$ cat tmux_work.log&lt;br /&gt;tick-1&lt;br /&gt;tick-2&lt;br /&gt;tick-3&lt;br /&gt;tick-4&lt;br /&gt;tick-5&lt;br /&gt;tick-6&lt;br /&gt;tick-7&lt;br /&gt;tick-8&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt; EXAMPLES 절이 이 흐름을 그대로 요약합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A session may be detached using 'C-b d' (or by an external event such as ssh(1) disconnection) and reattached with: $ tmux attach-session&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt;, EXAMPLES&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Ctrl+b&lt;/code&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;d&lt;/code&gt;(의도적 detach)와 &quot;SSH 연결이 끊김&quot;(사고성 hangup)을 매뉴얼이 같은 문장에서 나란히 다룹니다.&lt;/b&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 입장에서는 둘이 사실상 같은 이벤트이기 때문입니다 &amp;mdash; 클라이언트가 사라졌을 뿐, 서버(그리고 그 안의 작업)는 계속 돕니다. 화면으로 돌아가려면 이렇게 씁니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;tmux -L lab34 attach -t deploy&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이렇게 붙었다면, 다음 절로 넘어가기 전에 &lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Ctrl+b&lt;/code&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;d&lt;/code&gt;로 다시 빠져나옵니다.&lt;/b&gt; 붙은 채로 다음 명령(세션을 끄는 명령이 곧 나옵니다)을 그 안에서 치면 자기 자신의 화면을 끄는 셈이 됩니다.&lt;/p&gt;
&lt;h3 id=&quot;sc5&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 5 &amp;mdash; 교차검증: 두 도구가 정말 다른 메커니즘인지 부모 프로세스로 확인한다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;으로 살아남은 프로세스&lt;/b&gt;는 원래 부모(로그인 셸)가 죽었으니 새 부모가 필요합니다. 리눅스는 고아 프로세스를 PID 1(이 서버는 systemd)에게 입양시킵니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ rm -f orphan.pid orphan.log&lt;br /&gt;$ rm -f outer.pgid&lt;br /&gt;$ setsid bash -c 'echo $$ &amp;gt; outer.pgid; nohup sleep 30 &amp;gt; orphan.log 2&amp;gt;&amp;amp;1 &amp;amp; echo $! &amp;gt; orphan.pid; sleep 2' &amp;lt; /dev/null &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;$ disown&lt;br /&gt;$ sleep 1; kill -HUP -&quot;$(cat outer.pgid)&quot;; sleep 2&lt;br /&gt;$ ps -o pid=,ppid=,cmd= -p &quot;$(cat orphan.pid)&quot;&lt;br /&gt;2673697&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1 sleep 30&lt;br /&gt;$ kill -9 &quot;$(cat orphan.pid)&quot;&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;PPID&lt;/code&gt;가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;1&lt;/code&gt;입니다 &amp;mdash; 원래 부모였던 로그인 셸이 사라지자 커널이 즉시 이 프로세스를 PID 1에게 입양시켰습니다.&lt;/b&gt; 부모가 먼저 죽은 자식은 init(PID 1)이 다시 부모가 되어 나중에 좀비를 거둡니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 세션 안의 프로세스&lt;/b&gt;는 다릅니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ tmux -L lab34 kill-server 2&amp;gt;/dev/null&lt;br /&gt;$ tmux -L lab34 new-session -d -s probe 'sleep 30'&lt;br /&gt;$ sleep 1&lt;br /&gt;$ PANE_PID=$(tmux -L lab34 list-panes -t probe -F '#{pane_pid}'); ps -o pid=,ppid=,cmd= -p &quot;$PANE_PID&quot;&lt;br /&gt;2709472 2709471 sleep 30&lt;br /&gt;$ ps -o pid=,cmd= -p &quot;$(ps -o ppid= -p &quot;$PANE_PID&quot; | tr -d ' ')&quot;&lt;br /&gt;2709471 tmux -L lab34 new-session -d -s probe sleep 30&lt;br /&gt;$ tmux -L lab34 kill-server&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;부모가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;1&lt;/code&gt;이 아니라 여전히 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 서버 프로세스입니다.&lt;/b&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 &quot;고아가 되고도 살아남는&quot; 방식이고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 &quot;애초에 로그인 셸의 자식이 아니라 서버의 자식으로 태어나는&quot; 방식입니다 &amp;mdash; 두 도구가 같은 증상(접속이 끊겨도 산다)을 완전히 다른 층위에서 풉니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;
&lt;div style=&quot;display: block; float: none; position: static; font-size: 14px; color: #6b7280; text-align: center; margin-top: 10px; line-height: 1.7; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;720&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/d5GHcy/dJMcagUeA1c/9lKVedcOOthkSwMcEzaBN1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/d5GHcy/dJMcagUeA1c/9lKVedcOOthkSwMcEzaBN1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/d5GHcy/dJMcagUeA1c/9lKVedcOOthkSwMcEzaBN1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fd5GHcy%2FdJMcagUeA1c%2F9lKVedcOOthkSwMcEzaBN1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1960&quot; height=&quot;720&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;720&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; font-size: 14px; color: #6b7280; text-align: center; margin-top: 10px; line-height: 1.7; background: transparent !important;&quot;&gt;&lt;b&gt;같은 결과(접속이 끊겨도 산다)를 만드는 두 가지 다른 부모-자식 경로입니다.&lt;/b&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 고아가 됐다가 입양되고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 처음부터 서버의 자식입니다&lt;/div&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 함정 코너 &amp;mdash; &quot;분명히 살려놨는데&quot; 여섯 가지&lt;/h2&gt;
&lt;h3 id=&quot;t1&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;함정 1. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup.out&lt;/code&gt;이 어디 생겼는지 못 찾는다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;출력 리다이렉션 없이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;만 쓰면, 그 출력이 어디로 가는지는 &lt;b&gt;현재 디렉터리가 쓰기 가능한가&lt;/b&gt;에 달렸습니다. (&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;script -qc &quot;...&quot; /dev/null&lt;/code&gt;은 표준출력을 진짜 터미널처럼 보이게 만드는 용도로만 씁니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;의 아래 분기가 &quot;표준출력이 터미널일 때&quot;에만 적용되기 때문입니다.)&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;⚠️ 아래 블록은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;~/nohup.out&lt;/code&gt;을 지웠다가 다시 만듭니다 &amp;mdash; 그 자리에 이미 진짜 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt; 작업의 로그가 있다면 먼저 다른 이름으로 옮겨 둡니다(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;mv ~/nohup.out ~/nohup.out.bak&lt;/code&gt;).&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ mkdir -p readonly &amp;amp;&amp;amp; chmod 555 readonly &amp;amp;&amp;amp; cd readonly&lt;br /&gt;$ rm -f ~/nohup.out&lt;br /&gt;$ script -qc &quot;nohup sleep 1&quot; /dev/null &amp;lt; /dev/null&lt;br /&gt;nohup: ignoring input and appending output to '/home/wowpanel/nohup.out'&lt;br /&gt;$ ls -la ~/nohup.out&lt;br /&gt;-rw-------. 1 wowpanel wowpanel 0&amp;nbsp;&amp;nbsp;8월 23 16:15 /home/wowpanel/nohup.out&lt;br /&gt;$ cd .. &amp;amp;&amp;amp; chmod 755 readonly &amp;amp;&amp;amp; rm -rf readonly ~/nohup.out&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man nohup&lt;/code&gt;이 정확히 이 순서를 적어 둡니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;If standard output is a terminal, append output to 'nohup.out' if possible, '$HOME/nohup.out' otherwise.&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man nohup&lt;/code&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;현재 디렉터리에 쓰기 권한이 없으면 조용히 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;$HOME&lt;/code&gt;으로 넘어갑니다&lt;/b&gt; &amp;mdash; 에러가 아니라 안내 메시지 한 줄로만 알려 줍니다. 로그가 안 보이면 실행하던 디렉터리가 아니라 홈부터 확인합니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #16a34a; background: #f0fdf4 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;디스크 어디에 쌓이는지 모르는 로그를 만들지 않으려면, 애초에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup 명령 &amp;gt; 원하는경로.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;/code&gt;로 목적지를 직접 지정합니다.&lt;/p&gt;
&lt;/div&gt;
&lt;h3 id=&quot;t2&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;함정 2. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup.out&lt;/code&gt;은 언제나 600 &amp;mdash; 다른 계정과 공유가 안 된다&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ umask&lt;br /&gt;0022&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ mkdir -p ro2 &amp;amp;&amp;amp; chmod 555 ro2&lt;br /&gt;$ for u in 0022 0077 0400; do (cd ro2; umask $u; script -qc &quot;nohup sleep 1&quot; /dev/null &amp;lt; /dev/null &amp;gt;/dev/null; stat -c '%a' ~/nohup.out; rm -f ~/nohup.out); done&lt;br /&gt;600&lt;br /&gt;600&lt;br /&gt;600&lt;br /&gt;$ chmod 755 ro2 &amp;amp;&amp;amp; rm -rf ro2&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;umask를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0022&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0077&lt;/code&gt;&amp;middot;심지어 &lt;b&gt;더 좁게 깎는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0400&lt;/code&gt;&lt;/b&gt;으로 바꿔도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup.out&lt;/code&gt;은 항상 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;600&lt;/code&gt;입니다. 일반적인 umask 산수(요청한 모드에서 umask 비트를 빼는 것)라면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;0400&lt;/code&gt;일 때 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;200&lt;/code&gt;이 나와야 하는데 그렇지 않습니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;이 이 파일을 열 때 &lt;b&gt;umask 자체를 일시적으로 자신이 원하는 값으로 바꿔치기했다가 되돌리기&lt;/b&gt; 때문입니다. 배포 로그를 다른 계정(모니터링 봇 등)이 읽어야 한다면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup.out&lt;/code&gt;에 의존하지 말고 리다이렉션 경로를 직접 지정한 뒤 별도로 권한을 맞춥니다.&lt;/p&gt;
&lt;h3 id=&quot;t3&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;함정 3. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;을 걸었는데도 원격 자동화에서는 죽는다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#sc3&quot;&gt;시나리오 3&lt;/a&gt;에서 이미 확인했습니다. &lt;b&gt;&quot;직접 접속해서 손으로 확인했을 때는 됐는데, CI/배치 스크립트에 넣었더니 죽는다&quot;는 보고가 오면 이 함정입니다.&lt;/b&gt; 자동화 스크립트가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ssh 서버 '명령 &amp;amp; disown'&lt;/code&gt; 형태로 원격 백그라운드 작업을 거는 순간, 그 셸은 작업 제어가 꺼진 비대화형 셸이라 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;의 보호가 안 먹습니다. 이런 경로에는 처음부터 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;을 씁니다.&lt;/p&gt;
&lt;h3 id=&quot;t4&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;함정 4. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;huponexit&lt;/code&gt;이 켜진 서버에서는 그냥 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;exit&lt;/code&gt;만 쳐도 죽는다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;지금까지의 재현은 전부 &lt;b&gt;&quot;연결이 예기치 않게 끊기는&quot; 경우&lt;/b&gt;(로그인 셸이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 받는 경우)였습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;bash&lt;/code&gt;에는 이것과 별개로, &lt;b&gt;정상적으로 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;exit&lt;/code&gt;를 쳐서 로그아웃할 때도&lt;/b&gt; job을 정리하는 옵션이 있습니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ shopt huponexit&lt;br /&gt;huponexit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;off&lt;/div&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;huponexit &amp;mdash; If set, bash will send SIGHUP to all jobs when an interactive login shell exits.&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man bash&lt;/code&gt;, SHELL BUILTIN COMMANDS(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;shopt&lt;/code&gt;)&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;이 서버는 기본값(꺼짐)이라 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;exit&lt;/code&gt;로 정상 로그아웃하는 것만으로는 job이 안 죽습니다&lt;/b&gt; &amp;mdash; 접속이 끊길 때 죽는 건 이 옵션 때문이 아니라 2장에서 본 &quot;셸이 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 받으면 재전송한다&quot;는 규칙 때문입니다. 하지만 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;shopt -s huponexit&lt;/code&gt;로 이 옵션을 켠 로그인 셸(원격 배포용 계정에 이렇게 설정해 둔 곳이 있습니다)에서는 &lt;b&gt;일부러 얌전히 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;exit&lt;/code&gt;를 쳐도&lt;/b&gt; 백그라운드 job이 함께 죽습니다. 서버를 옮겨 다니는 운영자라면 새 서버에서 이 값부터 한 번 확인해 두는 편이 안전합니다.&lt;/p&gt;
&lt;h3 id=&quot;t5&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;함정 5. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 세션은 로그 파일이 안 남고 통째로 사라진다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 죽어도 최소한 그때까지의 출력이 로그 파일로 남습니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 다릅니다 &amp;mdash; &lt;b&gt;세션은 메모리에만 있는 서버 프로세스의 상태&lt;/b&gt;이므로, 서버가 재부팅되거나 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 서버 프로세스 자체가 죽으면(OOM Killer에 잡히는 경우도 포함, &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;../리눅스%2015%20-%20dmesg&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;15편&lt;/a&gt; 참고) &lt;b&gt;그 세션 안에서 실행 중이던 작업의 화면 내용까지 전부 사라집니다.&lt;/b&gt;&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #dc2626; background: #fef2f2 !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;아래는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; &lt;b&gt;서버 프로세스 자체&lt;/b&gt;를 죽이는 재현입니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-L lab34&lt;/code&gt;(이 글 전용 소켓)로 격리했는데도 굳이 다시 적어 두는 이유는, 이 조작을 기본 소켓에 그대로 했다가는 &lt;b&gt;지금 그 계정의 다른 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 세션까지 전부 같이 죽기 때문&lt;/b&gt;입니다. 절대 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-L&lt;/code&gt; 없이 시도하지 않습니다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ tmux -L lab34 new-session -d -s willvanish 'sleep 30'; sleep 1&lt;br /&gt;$ VPID=$(tmux -L lab34 list-panes -t willvanish -F '#{pane_pid}'); SPID=$(ps -o ppid= -p &quot;$VPID&quot; | tr -d ' '); kill -9 &quot;$SPID&quot;&lt;br /&gt;$ sleep 1; tmux -L lab34 list-sessions 2&amp;gt;&amp;amp;1&lt;br /&gt;no server running on /tmp/tmux-1000/lab34&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 서버 프로세스 하나를 죽이자 세션 자체가 통째로 사라졌습니다.&lt;/b&gt; 정말 중요한 장시간 작업이면 화면을 유지해 주는 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;에만 기대지 말고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;처럼 파일로도 로그를 남깁니다(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 안에서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;명령 | tee 로그&lt;/code&gt;를 쓰면 둘 다 챙길 수 있습니다).&lt;/p&gt;
&lt;h3 id=&quot;t6&quot; style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;함정 6. 다른 계정으로 붙었더니 방금 만든 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 세션이 안 보인다&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ tmux -L testsock new-session -d -s hidden 'sleep 5'&lt;br /&gt;$ tmux -L testsock list-sessions&lt;br /&gt;hidden: 1 windows (created Sun Aug 23 16:15:16 2026)&lt;br /&gt;$ tmux -L lab34 list-sessions 2&amp;gt;&amp;amp;1&lt;br /&gt;no server running on /tmp/tmux-1000/lab34&lt;br /&gt;$ tmux -L testsock kill-server 2&amp;gt;/dev/null&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 계정, 같은 서버인데도 소켓 이름(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-L&lt;/code&gt;)이 다르면 서로 안 보입니다&lt;/b&gt; &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;lab34&lt;/code&gt; 소켓에서 보면 방금 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;testsock&lt;/code&gt;에 만든 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;hidden&lt;/code&gt; 세션이 아예 없는 것처럼 나옵니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt;가 소켓 위치를 명시합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;the sockets are all created in a directory tmux-UID under the directory given by TMUX_TMPDIR or in /tmp.&quot;&lt;/b&gt;&lt;br /&gt;&amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt;, DESCRIPTION(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;-L&lt;/code&gt;)&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;기본 소켓 디렉터리 이름에 &lt;b&gt;UID가 그대로 들어갑니다&lt;/b&gt;(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/tmp/tmux-1000&lt;/code&gt;). &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;su&lt;/code&gt;나 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sudo -u&lt;/code&gt;로 다른 계정이 되어 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux attach&lt;/code&gt;를 치면 그 계정의 UID로 된 &lt;b&gt;다른 디렉터리&lt;/b&gt;를 보게 되어, 방금 만든 세션이 &quot;없다&quot;고 나옵니다 &amp;mdash; 지워진 게 아니라 다른 서랍을 열어 본 것입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 심화 &amp;mdash; systemd 서비스라면 이 글은 안 통합니다&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글의 모든 재현은 &lt;b&gt;로그인 셸의 SSH 세션&lt;/b&gt; 관점입니다. &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;../리눅스%2029%20-%20systemctl&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;29편&lt;/a&gt;(systemctl)이 이미 확정해 둔 것이 있습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;setsid&lt;/code&gt; &amp;middot; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt; &amp;middot; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;은 systemd가 관리하는 유닛에서 프로세스를 cgroup 밖으로 못 뺀다 &amp;mdash; systemd가 추적&amp;middot;종료 대상으로 삼는 건 이름이나 부모 관계가 아니라 &lt;b&gt;cgroup&lt;/b&gt;이기 때문이다.&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;이 글의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;/&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 &quot;로그인 셸이 사라져도 프로세스가 산다&quot;는 문제를 풉니다.&lt;/b&gt; 반면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl stop&lt;/code&gt;이 보내는 신호는 SSH 연결 여부와 무관하게 &lt;b&gt;그 유닛의 cgroup 전체&lt;/b&gt;로 갑니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;으로 신호를 무시하게 만들어 놔도, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 세션 안에서 띄워 놔도 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;KillMode&lt;/code&gt; 기본값(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;control-group&lt;/code&gt;)인 systemd 서비스는 여전히 그 안에서 죽습니다. &lt;b&gt;&quot;터미널이 끊겨도 산다&quot;와 &quot;서비스 관리자가 내려도 산다&quot;는 완전히 다른 질문&lt;/b&gt;이고, 후자는 이 글이 아니라 &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;../리눅스%2029%20-%20systemctl&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;29편&lt;/a&gt;의 영역입니다. 배포 스크립트가 systemd 유닛으로 관리되고 있다면, 지금 필요한 건 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;이 아니라 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemd-run&lt;/code&gt;이나 별도 유닛 파일입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 치트시트 &amp;middot; 장애 대응 5분 루틴&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;접속을 끊어야 하는데 작업이 안 끝났을 때&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;① 아직 시작 전이면&lt;/b&gt; &amp;rarr; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup 명령 &amp;gt; 로그 2&amp;gt;&amp;amp;1 &amp;amp;&lt;/code&gt;로 처음부터 띄웁니다. 파이프가 있으면 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup bash -c &quot;명령 | tee 로그&quot; &amp;amp;&lt;/code&gt;처럼 전체를 감쌉니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;② 이미 대화형으로 돌고 있으면&lt;/b&gt; &amp;rarr; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;Ctrl+Z&lt;/code&gt; &amp;rarr; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;bg&lt;/code&gt; &amp;rarr; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown -h&lt;/code&gt;. &lt;b&gt;단, 이 경로가 지금 대화형 세션인지 먼저 확인합니다&lt;/b&gt;(자동화 스크립트 안이면 안 통합니다 &amp;mdash; &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#t3&quot;&gt;함정 3&lt;/a&gt;).&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;③ 화면도 계속 봐야 하거나 여러 창이 필요하면&lt;/b&gt; &amp;rarr; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux new -s 이름&lt;/code&gt;으로 처음부터 그 안에서 작업합니다. 로그 파일은 별도로 챙깁니다(&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#t5&quot;&gt;함정 5&lt;/a&gt;).&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;여기까지 해서도 접속이 끊기면 작업이 죽는다면, 그건 이 글의 영역이 아니라 &lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;systemd 유닛의 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;KillMode&lt;/code&gt;&lt;/a&gt; 문제입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;복사해서 붙여 두고 쓰는 명령&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;# ── 지금 바로 백그라운드로 안전하게 ──────────────&lt;br /&gt;nohup 명령 &amp;gt; ~/작업.log 2&amp;gt;&amp;amp;1 &amp;amp;&lt;br /&gt;echo &quot;PID: $!&quot;&lt;br /&gt;&lt;br /&gt;# ── 파이프 전체를 지키기 ──────────────&lt;br /&gt;nohup bash -c &quot;명령1 | 명령2 &amp;gt; ~/작업.log&quot; &amp;amp;&lt;br /&gt;&lt;br /&gt;# ── tmux 세션 관리 ──────────────&lt;br /&gt;tmux new -s 이름 # 새 세션&lt;br /&gt;tmux ls # 세션 목록&lt;br /&gt;tmux attach -t 이름 # 재접속&lt;br /&gt;tmux kill-session -t 이름 # 세션 종료&lt;br /&gt;&lt;br /&gt;# ── 지금 이 셸의 huponexit 확인 ──────────────&lt;br /&gt;shopt huponexit&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;옵션 한 장 요약&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;명령&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;무엇을 하나&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup 명령 &amp;amp;&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;이 명령 하나가 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 무시하게 만듭니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown -h %1&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;대화형 세션에서만, 셸이 그 job에 재전송하지 않게 합니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux new -s 이름&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;새 세션을 만들고 그 안에서 작업을 시작합니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux new -d -s 이름 '명령'&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;화면에 붙지 않고 바로 백그라운드로 세션을 만듭니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux attach -t 이름&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;접속이 끊겼던 세션 화면으로 돌아갑니다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux ls&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;지금 서버에 떠 있는 세션 목록&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;shopt huponexit&lt;/code&gt;&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;정상 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;exit&lt;/code&gt;만으로도 job을 죽일지 여부&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;실습 정리&lt;/h3&gt;
&lt;div style=&quot;display: block; float: none; position: static; background: #1e1e1e !important; color: #e6e6e6 !important; border-radius: 8px; padding: 18px 20px; margin: 0 0 24px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace !important; white-space: pre !important; tab-size: 8; -webkit-text-size-adjust: 100%; text-align: left; word-spacing: normal; text-indent: 0;&quot;&gt;$ tmux -L lab34 kill-server 2&amp;gt;/dev/null; tmux kill-server 2&amp;gt;/dev/null&lt;br /&gt;$ cd ~ &amp;amp;&amp;amp; rm -rf ~/nohuplab ~/tmuxdoc&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;마무리&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;과 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 증상은 같지만(접속이 끊겨도 작업이 산다) 해법의 층위가 다릅니다. &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 신호 하나를 프로세스 스스로 무시하게 만드는 가장 가벼운 방법이고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 세션 자체를 별도 서버로 옮겨 화면까지 통째로 보존하는 더 무거운(그리고 그만큼 더 강력한) 방법입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;오늘 다룬 것 중 딱 세 가지만 가져가신다면 이겁니다.&lt;/p&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;amp;&lt;/code&gt;만으로는 접속이 끊기는 순간 함께 죽습니다&lt;/b&gt; &amp;mdash; 작업 제어가 꺼진 셸에서는 커널이 프로세스 그룹 전체에 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 직접 보내고, 대화형 셸에서도 자신이 받은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;SIGHUP&lt;/code&gt;을 job 전체에 재전송합니다(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man bash&lt;/code&gt; SIGNALS) &amp;mdash; 경로는 둘이지만 결과는 같습니다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;은 파이프의 첫 명령에만 걸리고, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;은 작업 제어가 켜진 대화형 세션에서만 통합니다&lt;/b&gt; &amp;mdash; 자동화 스크립트라면 전체를 감싼 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;nohup&lt;/code&gt;이 가장 안전합니다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt;는 세션을 별도 서버로 옮기는 것이라 화면째 보존되지만, 그 서버가 죽으면(재부팅 포함) 로그 없이 통째로 사라집니다&lt;/b&gt; &amp;mdash; 중요한 작업은 파일 로그도 같이 남깁니다.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;
&lt;div style=&quot;display: block; float: none; position: static; font-size: 14px; color: #6b7280; text-align: center; margin-top: 10px; line-height: 1.7; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-04.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;600&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/dxFcMS/dJMcabk82m0/2db5CQ0KT6MWMdXMItDp90/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/dxFcMS/dJMcabk82m0/2db5CQ0KT6MWMdXMItDp90/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/dxFcMS/dJMcabk82m0/2db5CQ0KT6MWMdXMItDp90/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FdxFcMS%2FdJMcabk82m0%2F2db5CQ0KT6MWMdXMItDp90%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1960&quot; height=&quot;600&quot; data-filename=&quot;IMG-04.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;600&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;div style=&quot;display: block; float: none; position: static; font-size: 14px; color: #6b7280; text-align: center; margin-top: 10px; line-height: 1.7; background: transparent !important;&quot;&gt;&lt;b&gt;&quot;접속이 끊겨도 산다&quot;는 같은 목표를 세 가지 다른 층위에서 풉니다.&lt;/b&gt; 어느 것도 다른 것의 상위 호환이 아니라, 문제가 어느 층위에 있는지에 따라 골라야 합니다&lt;/div&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;이 글로 리눅스/인프라 운영 연재를 마칩니다.&lt;/b&gt; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;grep&lt;/code&gt;으로 시작해 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;awk&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;sed&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ps&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;top&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;strace&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;systemctl&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ssh&lt;/code&gt;를 거쳐 여기까지, 명령 하나당 글 하나로 32편을 썼습니다(번호는 34까지 갔지만, 검증 서버가 raw socket을 막아 재현이 안 됐던 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tcpdump&lt;/code&gt;와 아래 두 가지가 로드맵에서 빠져 32편입니다). 처음 계획에는 리다이렉션(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;&amp;gt;&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;2&amp;gt;&amp;amp;1&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tee&lt;/code&gt;)과 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;uptime&lt;/code&gt;/&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;last&lt;/code&gt;/&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;w&lt;/code&gt;도 있었지만, 연재가 길어져 이 글을 마지막으로 매듭짓기로 했습니다. 다루지 못한 것들은 이미 다룬 32편 안에서도 조각조각 만나셨을 겁니다 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;2&amp;gt;&amp;amp;1&lt;/code&gt;은 이 글의 시나리오 2에서, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;w&lt;/code&gt;가 보여주는 정보의 절반은 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;ps&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;top&lt;/code&gt;편에서 이미 지나왔습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;읽어 주셔서 감사합니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;참고&lt;/h3&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man nohup&lt;/code&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man bash&lt;/code&gt; &amp;mdash; SIGNALS &amp;middot; JOB CONTROL &amp;middot; SHELL BUILTIN COMMANDS(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;disown&lt;/code&gt;&amp;middot;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;shopt&lt;/code&gt;)&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;tmux&lt;/code&gt; 패키지 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;CHANGES&lt;/code&gt;(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: pre-wrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/usr/share/doc/tmux/CHANGES&lt;/code&gt;)&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man tmux&lt;/code&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;man 7 signal&lt;/code&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;https://github.com/tmux/tmux&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;tmux 공식 저장소&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/crontab-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EC%83%88%EB%B2%BD-%EB%B0%B0%EC%B9%98%EA%B0%80-%EC%A1%B0%EC%9A%A9%ED%9E%88-%EC%A3%BD%EB%8A%94-%EC%9D%B4%EC%9C%A0&quot;&gt;새벽 배치가 조용히 죽는 이유&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/ps-%EB%A1%9C%EA%B7%B8%EA%B0%80-%EC%97%86%EB%8A%94-%EC%9E%A5%EC%95%A0-%EC%95%9E%EC%97%90%EC%84%9C-%ED%94%84%EB%A1%9C%EC%84%B8%EC%8A%A4%EB%A5%BC-%EC%9D%BD%EB%8A%94-%EB%B2%95&quot;&gt;로그가 없는 장애 앞에서 프로세스를 읽는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/kill-%EC%82%AC%EC%9A%A9%EB%B2%95-%EC%A2%85%EB%A3%8C%ED%96%88%EB%8A%94%EB%8D%B0-%EC%99%9C-%EC%95%88-%EC%A3%BD%EC%8A%B5%EB%8B%88%EA%B9%8C&quot;&gt;종료했는데도 프로세스가 안 죽을 때&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/ssh-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-%EC%A0%91%EC%86%8D%EC%9D%B4-%EC%95%88-%EB%90%A0-%EB%95%8C&quot;&gt;SSH 접속 자체가 안 되는 경우라면&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
      <category>리눅스/서비스,권한,쉘</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/42</guid>
      <comments>https://wowpanel.tistory.com/entry/nohup-tmux-%EC%99%84%EB%B2%BD-%EC%A0%95%EB%A6%AC-%E2%80%94-SSH%EA%B0%80-%EB%81%8A%EA%B8%B0%EB%A9%B4-%EC%99%9C-%EB%B0%B1%EA%B7%B8%EB%9D%BC%EC%9A%B0%EB%8A%90-%EC%9E%91%EC%97%85%EA%B9%8C%EC%A7%80-%EA%B0%99%EC%9D%B4-%EC%A3%BD%EB%8A%94%EA%B0%80#entry42comment</comments>
      <pubDate>Mon, 31 Aug 2026 06:34:56 +0900</pubDate>
    </item>
    <item>
      <title>VPC &amp;mdash; 온프레미스 사내망 설계 감각으로 읽는 AWS의 가상 네트워크</title>
      <link>https://wowpanel.tistory.com/entry/VPC-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EC%82%AC%EB%82%B4%EB%A7%9D-%EC%84%A4%EA%B3%84-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B0%80%EC%83%81-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC</link>
      <description>&lt;div style=&quot;display: block; float: none; position: static; max-width: 1000px; margin: 0 auto; padding: 8px 4px; text-align: left; background: #ffffff !important; color: #333333 !important; font-size: 17px; line-height: 1.9; word-break: keep-all;&quot;&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 사내망을 설계할 때는 코어 스위치에서 VLAN을 나누고, 서브넷마다 게이트웨이를 두고, 인터넷으로 나가는 구간에는 방화벽을 세웁니다. AWS에서 EC2 인스턴스를 띄우기 전에도 똑같은 결정이 필요합니다 &amp;mdash; 다만 물리 장비 대신 VPC라는 논리적인 네트워크를 먼저 설계해야 합니다. 이름 그대로 &quot;가상 사설 클라우드&quot;이지만, &lt;b&gt;CIDR(Classless Inter-Domain Routing &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;10.0.0.0/16&lt;/code&gt;처럼 IP 대역의 범위를 표기하는 방식, 사내망의 서브넷 마스크 표기와 같은 역할)&lt;/b&gt; 로 지정한 IP 대역을 나중에 넓힐 수 없다거나 서브넷이 특정 위치에 고정된다거나 하는, 물리 네트워크에서는 신경 쓰지 않던 제약이 있습니다. 이 글은 VPC가 정확히 무엇이고, 사내망을 설계해 본 사람이 이걸 처음 만졌을 때 어디서 헷갈리는지를 다룹니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; border-left: 4px solid #2563eb; background: #f8fafc !important; color: #333333 !important; padding: 16px 20px 4px; margin: 0 0 24px; border-radius: 0 6px 6px 0; text-align: left;&quot;&gt;
&lt;p style=&quot;margin: 0 0 12px; font-size: 16px; line-height: 1.8; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;사내망에서 코어 스위치로 VLAN을 나누고 서브넷마다 방화벽 정책을 걸어 온 네트워크 관리자가 이번 프로젝트에서 VPC를 처음부터 설계하게 됐다. CIDR을 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;10.0.0.0/24&lt;/code&gt;로 작게 잡았는데, 몇 달 뒤 서브넷이 모자라 대역을 넓히려 하니 콘솔에서 막힌다. 그리고 &quot;일단 되나 보자&quot;며 기본 제공되는 VPC에 테스트 서버를 하나 올렸는데, 나중에 보니 인터넷에서 그대로 접근되는 상태였다. &quot;사내망에서는 안 이랬는데&quot;라는 질문에서 시작한다.&lt;/p&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;이 글은 실제 AWS 콘솔 화면이나 CLI 실행 결과를 캡처하지 않습니다. CIDR 블록 크기 규칙, 서브넷과 가용 영역의 관계, 퍼블릭&amp;middot;프라이빗 서브넷을 가르는 기준, 기본 VPC의 구성, 보안 그룹의 동작 방식처럼 이 글이 다루는 사실 하나하나는 전부 AWS 공식 문서(Amazon VPC User Guide)를 직접 열어 원문을 대조한 것입니다. 정확한 가격은 리전과 시점에 따라 바뀌므로, 구체적인 숫자보다 &quot;무엇이 과금 대상이고 무엇이 아닌가&quot;에 초점을 둡니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;목차&lt;/h2&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s1&quot;&gt;VPC가 정확히 뭔가&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s2&quot;&gt;온프레미스 대응표&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s3&quot;&gt;실무에서 반드시 알아야 하는 것&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s4&quot;&gt;온프레미스 관리자가 자주 하는 오해&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s5&quot;&gt;비용&amp;middot;운영 감각&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s6&quot;&gt;관련 개념&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;a style=&quot;color: #2563eb !important; text-decoration: underline; display: inline; font-size: inherit; line-height: inherit; background: transparent !important;&quot; href=&quot;#s7&quot;&gt;한눈에 정리&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s1&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;1. VPC가 정확히 뭔가&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서는 VPC를 이렇게 정의합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;With Amazon Virtual Private Cloud (Amazon VPC), you can launch AWS resources in a logically isolated virtual network that you've defined. This virtual network closely resembles a traditional network that you'd operate in your own data center, with the benefits of using the scalable infrastructure of AWS.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 직접 설계&amp;middot;운영하던 사내망을 논리적으로 그대로 옮겨 놓은 것에 가깝습니다. 다만 AWS 문서가 나열하는 핵심 구성 요소를 보면 사내망과 매핑되는 지점이 분명해집니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Subnets: A subnet is a range of IP addresses in your VPC... Routing: Use route tables to determine where network traffic from your subnet or gateway is directed... Gateways and endpoints: A gateway connects your VPC to another network. For example, use an internet gateway to connect your VPC to the internet... Peering connections: Use a VPC peering connection to route traffic between the resources in two VPCs.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;서브넷(IP 대역을 나눈 것)&amp;middot;라우팅 테이블(트래픽을 어디로 보낼지)&amp;middot;게이트웨이(다른 네트워크와의 연결점)&amp;middot;피어링(VPC끼리의 연결) &amp;mdash; 사내망을 설계할 때 다루던 개념과 이름만 다를 뿐 역할은 같습니다. 그리고 VPC는 &lt;b&gt;리전 하나에 종속&lt;/b&gt;됩니다 &amp;mdash; 계정을 만들면 리전마다 기본 VPC가 하나씩 자동으로 생깁니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Your AWS account includes a default VPC in each AWS Region.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2160&quot; data-origin-height=&quot;1120&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bnEoOU/dJMcacROwcQ/8SEvSKU7YGCxv2gFXedZN1/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bnEoOU/dJMcacROwcQ/8SEvSKU7YGCxv2gFXedZN1/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bnEoOU/dJMcacROwcQ/8SEvSKU7YGCxv2gFXedZN1/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbnEoOU%2FdJMcacROwcQ%2F8SEvSKU7YGCxv2gFXedZN1%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2160&quot; height=&quot;1120&quot; data-filename=&quot;IMG-01.png&quot; data-origin-width=&quot;2160&quot; data-origin-height=&quot;1120&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s2&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;2. 온프레미스 대응표&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;같은 물건이 아니라 &quot;가장 가까운 것&quot;입니다.&lt;/b&gt; 대응시켜 놓고 다른 점을 무시하면 3&amp;middot;4장에서 다루는 오해로 바로 이어집니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;온프레미스&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;AWS&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;같은 점&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;다른 점&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사내망 전체 설계&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VPC&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;논리적으로 격리된 네트워크&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;리전 하나에 종속(1장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VLAN&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서브넷&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;IP 대역을 나눈 구획&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;가용 영역 하나에 고정(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;코어 스위치의 라우팅 테이블&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;(VPC) 라우팅 테이블&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;트래픽 목적지 결정&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서브넷마다 자동으로 하나씩 연결(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷 경계 라우터&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷 게이트웨이(IGW)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷으로 나가는 관문&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;라우팅 테이블에 경로가 있어야 실제로 열림(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;DMZ / 내부망 구분&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;퍼블릭 서브넷 / 프라이빗 서브넷&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;인터넷 노출 여부로 구획&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;물리 분리가 아니라 라우팅 설정 차이(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사내망 IP 대역 설계(고정)&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VPC CIDR 블록&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;처음에 크게 잡아야 함&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기존 블록 크기 변경 자체가 불가능(3장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;사이트 간 전용선&amp;middot;VPN&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;Direct Connect&amp;middot;Site-to-Site VPN&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;원격 네트워크 연결&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;이 글에서는 존재만 언급(6장)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;방화벽 규칙&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;보안 그룹&amp;middot;네트워크 ACL&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;트래픽 허용/차단&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;이 글에서는 깊이 다루지 않음(6장)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s3&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;3. 실무에서 반드시 알아야 하는 것&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;CIDR 블록은 처음 크기가 사실상 최종 크기다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서는 VPC의 IPv4 CIDR 블록 규칙을 이렇게 명시합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;When you create a VPC, you must specify an IPv4 CIDR block for the VPC. The allowed block size is between a /16 netmask (65,536 IP addresses) and /28 netmask (16 IP addresses).&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;그리고 크기 변경에 대해서는 이렇게 못 박습니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;You cannot increase or decrease the size of an existing CIDR block.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 사내망 대역이 부족해지면 스위치 설정을 바꿔 서브넷 마스크를 조정하는 것도 가능했지만, VPC는 &lt;b&gt;한번 만든 CIDR 블록의 크기 자체를 바꿀 수 없습니다.&lt;/b&gt; 대신 추가 CIDR 블록을 붙이는 것(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/28&lt;/code&gt;~&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/16&lt;/code&gt; 범위 안에서, 기존과 겹치지 않게)은 가능합니다. 도입부 시나리오에서 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/24&lt;/code&gt;(256개 주소)로 작게 잡았다가 막힌 것이 바로 이 제약입니다 &amp;mdash; 부족하면 새 대역을 추가하는 것이지, 기존 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/24&lt;/code&gt;를 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/20&lt;/code&gt;으로 넓히는 것 자체가 불가능합니다. 그래서 실무에서는 처음부터 여유 있게(&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/16&lt;/code&gt; 쪽으로) 잡아 두는 것이 정석입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;서브넷은 가용 영역 하나에 고정된다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서는 서브넷의 기본 제약을 이렇게 설명합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A subnet is a range of IP addresses in your VPC... Each subnet must reside entirely within one Availability Zone and cannot span zones.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;VLAN을 스위치 설정만 바꾸면 다른 랙, 다른 층으로 유연하게 옮길 수 있던 것과 달리, 서브넷은 &lt;b&gt;만들 때 지정한 가용 영역(AZ, Availability Zone &amp;mdash; 물리적으로 분리된 데이터센터 단위)에 그대로 고정됩니다.&lt;/b&gt; 다른 AZ로 옮기려면 그 AZ에 새 서브넷을 만들고 리소스를 재배치해야 합니다. VPC 전체가 여러 AZ에 걸쳐 있더라도, 그 안의 서브넷 하나하나는 각각 AZ 하나씩만 담당합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;퍼블릭 서브넷과 프라이빗 서브넷은 물리적 차이가 아니라 라우팅 설정 차이다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서는 서브넷 유형을 라우팅 기준으로 정의합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;The subnet type is determined by how you configure routing for your subnets... Public subnet &amp;ndash; The subnet has a direct route to an internet gateway. Resources in a public subnet can access the public internet. Private subnet &amp;ndash; The subnet does not have a direct route to an internet gateway.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스의 DMZ는 보통 물리적으로 별도 스위치&amp;middot;별도 방화벽 인터페이스로 분리하지만, VPC의 퍼블릭&amp;middot;프라이빗 구분은 &lt;b&gt;순전히 그 서브넷에 연결된 라우팅 테이블에 인터넷 게이트웨이로 가는 경로가 있는지&lt;/b&gt;로 갈립니다. 서브넷 자체에는 &quot;이건 퍼블릭, 이건 프라이빗&quot;이라는 물리적 표식이 없습니다 &amp;mdash; 라우팅 테이블의 경로 하나가 그 서브넷의 성격을 결정합니다. 그리고 서브넷 라우팅은 이렇게 동작합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Each subnet must be associated with a route table, which specifies the allowed routes for outbound traffic leaving the subnet. Every subnet that you create is automatically associated with the main route table for the VPC.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;서브넷을 새로 만들면 별도로 지정하지 않는 한 자동으로 VPC의 메인 라우팅 테이블에 연결됩니다. 이 메인 라우팅 테이블에 인터넷 게이트웨이 경로가 있는지 없는지가, 그 서브넷이 프라이빗인지 퍼블릭인지를 가르는 실질적인 기준입니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2000&quot; data-origin-height=&quot;1040&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/bvSXVE/dJMcacqVdJo/DzVZKEoVSCZItgva17oWlK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/bvSXVE/dJMcacqVdJo/DzVZKEoVSCZItgva17oWlK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/bvSXVE/dJMcacqVdJo/DzVZKEoVSCZItgva17oWlK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbvSXVE%2FdJMcacqVdJo%2FDzVZKEoVSCZItgva17oWlK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;2000&quot; height=&quot;1040&quot; data-filename=&quot;IMG-02.png&quot; data-origin-width=&quot;2000&quot; data-origin-height=&quot;1040&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 온프레미스 IP 대역 설계를 그대로 옮긴다면&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;사내망에서 본사 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;10.0.0.0/16&lt;/code&gt;, 부서별 VLAN을 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/24&lt;/code&gt;로 쪼개 쓰던 조직이 AWS로 전환하면서 같은 감각으로 VPC를 설계한다고 가정합니다.&lt;/p&gt;
&lt;ol style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: decimal outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;decimal&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;VPC CIDR부터 여유 있게 잡는다.&lt;/b&gt; 나중에 크기를 못 바꾸므로(위 사실), 당장 필요한 서버 수만 보고 작게 잡지 않고 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/16&lt;/code&gt;(65,536개 주소) 근처로 시작합니다. 온프레미스에서 본사 대역을 &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/16&lt;/code&gt;으로 잡던 것과 같은 이유입니다 &amp;mdash; 조직이 커질 걸 감안한 여유입니다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;AZ 개수만큼 서브넷을 쪼갠다.&lt;/b&gt; 서브넷이 AZ 하나에 고정되므로(위 사실), 최소한 사용할 AZ 개수만큼 서브넷이 필요합니다. 흔한 패턴은 AZ마다 퍼블릭 서브넷 하나, 프라이빗 서브넷 하나를 두는 것입니다 &amp;mdash; 부서별 VLAN을 나누던 감각을 &quot;AZ별 + 용도별&quot;로 확장한 것에 가깝습니다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;부서 대신 용도로 나눈다.&lt;/b&gt; 온프레미스에서는 부서(영업팀&amp;middot;개발팀)로 VLAN을 나누는 경우가 많지만, VPC 서브넷은 보통 &lt;b&gt;역할&lt;/b&gt;(웹 서버용 퍼블릭 서브넷, DB용 프라이빗 서브넷)로 나눕니다. 인터넷 노출 여부가 곧 서브넷 구분 기준이라는 3장의 원칙과 맞닿아 있습니다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;라우팅 테이블로 성격을 확정한다.&lt;/b&gt; 퍼블릭으로 쓸 서브넷의 라우팅 테이블에만 인터넷 게이트웨이 경로를 추가합니다. 이 경로 하나가 그 서브넷을 &quot;퍼블릭&quot;으로 만드는 전부입니다 &amp;mdash; 별도 물리 배선이 필요한 게 아닙니다.&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;CIDR 크기와 AZ 배치는 나중에 되돌리기 어려운 결정이라는 점에서, 온프레미스의 사내망 설계만큼(혹은 그 이상으로) 처음에 신중해야 하는 단계입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s4&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;4. 온프레미스 관리자가 자주 하는 오해&lt;/h2&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 1. &quot;VPC CIDR이 좁으면 나중에 넓히면 되지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;거꾸로입니다. 이미 만든 CIDR 블록은 크기를 늘리거나 줄일 수 없습니다(3장) &amp;mdash; 부족하면 새 CIDR 블록을 추가하는 방식으로만 대응할 수 있고, 그마저도 기존 블록과 겹치지 않아야 합니다. 온프레미스에서 스위치 설정으로 서브넷 마스크를 넓히던 유연함이 VPC에는 없습니다. 처음 설계 단계에서 여유 있게 잡는 것이 사실상 유일한 대응책입니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 2. &quot;서브넷도 나중에 다른 위치로 옮기면 되지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;서브넷은 만들 때 지정한 가용 영역에 고정됩니다(3장). VLAN을 스위치 설정 변경만으로 다른 랙에 옮기던 감각과 다릅니다 &amp;mdash; 다른 AZ로 옮기려면 그 AZ에 새 서브넷을 만들고 리소스를 재배치해야 합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 3. &quot;프라이빗 서브넷은 물리적으로 격리돼 있으니 더 안전하겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;방향은 맞지만 근거를 잘못 짚은 오해입니다. 프라이빗 서브넷이 안전한 이유는 물리적 격리가 아니라, &lt;b&gt;그 서브넷의 라우팅 테이블에 인터넷 게이트웨이로 가는 경로가 없기 때문&lt;/b&gt;입니다(3장). 만약 실수로 그 라우팅 테이블에 인터넷 게이트웨이 경로를 추가하면, 서브넷 이름이 &quot;프라이빗&quot;이어도 그 순간부터 퍼블릭처럼 동작합니다. 이름표가 아니라 라우팅 테이블의 실제 내용을 확인해야 합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 4. &quot;기본 제공되는 VPC를 그냥 쓰면 무난하겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;AWS 공식 문서는 기본 VPC의 구성을 이렇게 설명합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A default VPC comes with a public subnet in each Availability Zone, an internet gateway, and settings to enable DNS resolution.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;기본 VPC의 서브넷은 &lt;b&gt;전부 퍼블릭&lt;/b&gt;입니다 &amp;mdash; 빠르게 시작할 수 있도록 처음부터 인터넷 게이트웨이 경로가 걸려 있는 구성입니다. 온프레미스에서 &quot;기본값이니까 무난하게 안전할 것&quot;이라는 감각으로 접근하면 안 됩니다. 도입부 시나리오에서 테스트 서버가 인터넷에 그대로 노출된 이유가 이것입니다 &amp;mdash; 프로덕션 워크로드는 보통 프라이빗 서브넷을 포함해 VPC를 직접 설계하는 쪽을 권장합니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;오해 5. &quot;VPC도 유료 서비스니까 안 쓰면 비용이 나가겠지&quot;&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;거꾸로입니다. AWS 공식 문서는 이렇게 명시합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;There's no additional charge for using a VPC.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;VPC 자체, 서브넷, 라우팅 테이블, 보안 그룹은 만들어 두는 것만으로는 비용이 발생하지 않습니다. 비용은 그 안에 얹는 컴포넌트(NAT 게이트웨이, 퍼블릭 IPv4 주소 등)에서 발생합니다. 자세한 내용은 5장에서 다룹니다.&lt;/p&gt;
&lt;h3 style=&quot;font-size: 20px; line-height: 1.45; font-weight: bold; color: #1a1a1a; margin: 36px 0 14px; letter-spacing: -0.2px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size23&quot;&gt;시나리오 &amp;mdash; 서로 다른 리전의 VPC를 하나로 묶으려 한다&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;두 리전(예: 서울&amp;middot;도쿄)에 각각 VPC를 만들어 애플리케이션을 이중화한 뒤, 두 VPC 안의 서버가 서로 사설 IP로 직접 통신하게 만들려는 요청이 들어옵니다. 담당자는 &quot;VPC 하나에 리전 두 개를 걸치도록 서브넷만 추가하면 되겠지&quot;라고 생각하고 콘솔에서 리전을 바꿔 서브넷을 추가하려 하지만, 애초에 다른 리전에서는 그 VPC 자체가 보이지 않습니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;원인은 1장에서 확인한 그대로입니다 &amp;mdash; VPC는 리전 하나에 종속되는 자원이라, 서울 리전에서 만든 VPC는 도쿄 리전에 존재하지 않습니다. 사내망에서 본사와 지사를 전용선으로 묶어 하나의 IP 대역처럼 쓰던 것과 달리, VPC는 애초에 리전을 넘어 확장되는 개념이 아닙니다.&lt;/p&gt;
&lt;div style=&quot;display: block; float: none; position: static; margin: 32px 0; text-align: center; background: transparent !important;&quot;&gt;&lt;figure class=&quot;imageblock alignCenter&quot; data-ke-mobileStyle=&quot;widthOrigin&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;920&quot;&gt;&lt;span data-url=&quot;https://blog.kakaocdn.net/dn/BRQJZ/dJMcacqVdJr/eZ7Ki8bgw27DznH5moLKTK/img.png&quot; data-phocus=&quot;https://blog.kakaocdn.net/dn/BRQJZ/dJMcacqVdJr/eZ7Ki8bgw27DznH5moLKTK/img.png&quot;&gt;&lt;img src=&quot;https://blog.kakaocdn.net/dn/BRQJZ/dJMcacqVdJr/eZ7Ki8bgw27DznH5moLKTK/img.png&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FBRQJZ%2FdJMcacqVdJr%2FeZ7Ki8bgw27DznH5moLKTK%2Fimg.png&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot; loading=&quot;lazy&quot; width=&quot;1960&quot; height=&quot;920&quot; data-filename=&quot;IMG-03.png&quot; data-origin-width=&quot;1960&quot; data-origin-height=&quot;920&quot;/&gt;&lt;/span&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;당장 취할 조치는 VPC 피어링을 검토하는 것입니다. 두 리전 각각에 VPC를 그대로 두고, VPC 피어링 연결로 두 VPC의 라우팅 테이블에 서로를 향하는 경로를 추가합니다. AWS 공식 문서는 이 방식을 이렇게 안내합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Use a VPC peering connection to route traffic between the resources in two VPCs.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;VPC 자체를 합치는 것이 아니라, 별개인 두 VPC를 네트워크 수준에서 연결하는 방식입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;연결할 VPC나 VPN이 여러 개로 늘어날 것 같다면 전송 게이트웨이(Transit Gateway)를 검토합니다. 피어링은 VPC 쌍마다 개별로 맺어야 해서, 리전이나 VPC 수가 늘어나면 관리가 급격히 복잡해집니다. AWS 공식 문서는 이런 경우를 위한 중앙 허브 방식을 안내합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;Use a transit gateway, which acts as a central hub, to route traffic between your VPCs, VPN connections, and Direct Connect connections.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;사내망에서 지사가 늘어날수록 개별 전용선 대신 허브 앤 스포크 구조로 전환하던 것과 같은 방향의 해법입니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;어느 방식을 택하든 CIDR이 겹치지 않는지부터 먼저 확인해야 합니다. 피어링이든 전송 게이트웨이든, 두 VPC의 CIDR 블록이 겹치면 연결 자체가 불가능합니다. 처음 설계 단계에서 리전별 VPC의 대역을 서로 겹치지 않게 나눠 둬야 합니다(3장의 &quot;여유 있게 잡는다&quot;에 &quot;리전별로 겹치지 않게&quot;도 추가해야 하는 이유입니다).&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&quot;VPC는 리전 경계를 넘지 않는다&quot;는 것을 인프라 설계 초기에 반영해 두지 않으면, 멀티 리전 이중화 계획 자체를 다시 짜야 하는 상황을 만날 수 있습니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s5&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;5. 비용&amp;middot;운영 감각&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서는 스위치&amp;middot;라우터&amp;middot;방화벽 장비를 구매하는 순간 네트워크 인프라 비용 대부분이 확정됩니다. VPC는 이 감각과 크게 다릅니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;VPC&amp;middot;서브넷&amp;middot;라우팅 테이블&amp;middot;보안 그룹 자체는 무료입니다.&lt;/b&gt; 몇 개를 만들든, 얼마나 정교하게 나누든 그 자체로는 과금되지 않습니다. 온프레미스에서 &quot;물리 장비를 늘릴 때마다 비용이 든다&quot;는 감각을 VPC 설계에 그대로 옮기면, 필요 이상으로 서브넷을 아끼거나 단순하게 설계하는 방향으로 흘러갈 수 있습니다 &amp;mdash; 비용 부담 없이 용도별로 세분화해도 됩니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;비용은 VPC 안에 얹는 컴포넌트에서 발생합니다.&lt;/b&gt; 대표적으로 NAT 게이트웨이(프라이빗 서브넷이 인터넷에 나갈 때 거치는 컴포넌트, 5번 글에서 다룰 주제)가 있고, 트래픽 미러링&amp;middot;Reachability Analyzer 같은 부가 기능도 별도 과금됩니다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;퍼블릭 IPv4 주소는 이제 과금 대상입니다.&lt;/b&gt; AWS 공식 문서는 이렇게 설명합니다.&lt;/p&gt;
&lt;blockquote style=&quot;display: block; float: none; position: static; margin: 0 0 24px; padding: 14px 20px; background: #fbfbfc !important; color: #333333 !important; font-size: 16px; line-height: 1.8; border-left: 4px solid #6b7280; border-radius: 0 6px 6px 0; text-align: left;&quot; data-ke-style=&quot;style1&quot;&gt;&lt;b&gt;&quot;A public IPv4 address is an IPv4 address that is routable from the internet. A public IPv4 address is necessary for a resource to be directly reachable from the internet over IPv4.&quot;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&quot;Private IPv4 addresses (RFC 1918) are not charged.&quot;&lt;/b&gt;&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 20px; font-size: 17px; line-height: 1.9; color: #333333; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size16&quot;&gt;온프레미스에서 공인 IP가 회선 계약에 딸려 오는 경우가 많아 IP 자체 비용을 잘 의식하지 않는 것과 달리, VPC에서는 &lt;b&gt;사설 IP(RFC 1918 대역 &amp;mdash; &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;10.0.0.0/8&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;172.16.0.0/12&lt;/code&gt;, &lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;192.168.0.0/16&lt;/code&gt;처럼 인터넷에 직접 노출되지 않는 사설 IP 대역을 정의한 IETF 표준 문서)는 무료지만 퍼블릭 IP는 유료&lt;/b&gt;입니다(EC2 글 5장에서 다룬 탄력적 IP 과금과 같은 원칙의 연장선입니다). 프라이빗 서브넷 위주로 설계하는 것이 단순히 보안뿐 아니라 비용 측면에서도 유리한 이유입니다.&lt;/p&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s6&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;6. 관련 개념&lt;/h2&gt;
&lt;ul style=&quot;margin: 0 0 20px; padding-left: 24px; list-style: disc outside; background: transparent !important; color: #333333; text-align: left;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;보안 그룹&amp;middot;네트워크 ACL&lt;/b&gt; &amp;mdash; 서브넷&amp;middot;인스턴스 단위의 트래픽 제어. 이 글에서는 존재만 언급하고 깊이 다루지 않았다.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;NAT 게이트웨이&amp;middot;인터넷 게이트웨이&lt;/b&gt; &amp;mdash; 프라이빗 서브넷이 인터넷으로 나가는 경로, 퍼블릭 서브넷이 인터넷과 만나는 관문.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;ALB&amp;middot;NLB&lt;/b&gt; &amp;mdash; VPC 안 여러 서브넷에 걸쳐 트래픽을 분산하는 로드밸런서.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;Direct Connect&amp;middot;Site-to-Site VPN&lt;/b&gt; &amp;mdash; 온프레미스 네트워크와 VPC를 연결하는 전용선&amp;middot;VPN.&lt;/li&gt;
&lt;li style=&quot;margin: 0 0 8px; font-size: 17px; line-height: 1.9; color: #333333; display: list-item; text-align: left; background: transparent !important; list-style: inherit;&quot;&gt;&lt;b&gt;IAM&lt;/b&gt; &amp;mdash; 누가 VPC&amp;middot;서브넷&amp;middot;라우팅 테이블을 만들고 고칠 수 있는지를 통제하는 권한 체계.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr style=&quot;border: 0; border-top: 1px solid #e5e7eb; margin: 44px 0; height: 0; background: transparent !important;&quot; data-ke-style=&quot;style1&quot; /&gt;
&lt;h2 id=&quot;s7&quot; style=&quot;font-size: 26px; line-height: 1.4; font-weight: bold; color: #1a1a1a; margin: 56px 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; letter-spacing: -0.3px; word-break: keep-all; text-align: left; background: transparent !important;&quot; data-ke-size=&quot;size26&quot;&gt;7. 한눈에 정리&lt;/h2&gt;
&lt;div style=&quot;display: block; float: none; position: static; overflow-x: auto; margin: 0 0 24px; text-align: left; background: transparent !important;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse; width: 100%; font-size: 15px; color: #333333; min-width: 620px; display: table; background: transparent !important;&quot; data-ke-align=&quot;alignLeft&quot;&gt;
&lt;thead style=&quot;display: table-header-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;항목&lt;/th&gt;
&lt;th style=&quot;border: 1px solid #e5e7eb; background: #f4f4f5 !important; padding: 10px 13px; text-align: left; font-weight: bold; color: #1a1a1a !important; font-size: 15px; line-height: 1.7; display: table-cell;&quot;&gt;확인할 것&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody style=&quot;display: table-row-group;&quot;&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VPC&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;리전 하나에 종속, 다른 리전으로 자동 확장되지 않는다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;CIDR 블록&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/16&lt;/code&gt;~&lt;code style=&quot;background: #f4f4f5 !important; color: #c7254e !important; border-radius: 4px; padding: 2px 6px; display: inline; font-size: 15px; font-family: 'D2Coding',Menlo,Consolas,'Courier New',monospace; overflow-wrap: anywhere; line-height: inherit; white-space: nowrap; font-weight: inherit; text-align: inherit; word-break: keep-all;&quot;&gt;/28&lt;/code&gt; 범위, 생성 후 기존 블록 크기 변경 불가 &amp;mdash; 추가만 가능하다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서브넷&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;가용 영역 하나에 고정, VPC의 CIDR을 나눠 쓴다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;퍼블릭&amp;middot;프라이빗 구분&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;물리적 분리가 아니라 라우팅 테이블에 인터넷 게이트웨이 경로가 있는지로 결정된다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;라우팅 테이블&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서브넷마다 하나씩 연결, 지정 안 하면 메인 라우팅 테이블이 자동 적용된다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;기본 VPC&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;서브넷이 전부 퍼블릭으로 구성되어 있다&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VPC&amp;middot;서브넷&amp;middot;라우팅 테이블&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;그 자체로는 무료&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;퍼블릭 IPv4&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;유료, 사설 IP(RFC 1918)는 무료&lt;/td&gt;
&lt;/tr&gt;
&lt;tr style=&quot;display: table-row;&quot;&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;여러 리전 연결&lt;/td&gt;
&lt;td style=&quot;border: 1px solid #e5e7eb; padding: 10px 13px; vertical-align: top; background: #ffffff !important; color: #333333 !important; font-size: 15px; line-height: 1.7; text-align: left; display: table-cell;&quot;&gt;VPC 피어링(개별 연결) 또는 전송 게이트웨이(중앙 허브)가 필요하다&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2&gt;이어서 보면 좋은 글&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/%EB%B3%B4%EC%95%88-%EA%B7%B8%EB%A3%B9-vs-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC-ACL-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EB%B0%A9%ED%99%94%EB%B2%BD-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EC%9D%B4%EC%A4%91-%EB%B0%A9%EC%96%B4%EC%84%A0&quot;&gt;만든 네트워크를 방화벽 두 겹으로 지키는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/NAT-%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4%C2%B7%EC%9D%B8%ED%84%B0%EB%84%B7-%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EA%B2%BD%EA%B3%84-%EB%9D%BC%EC%9A%B0%ED%84%B0-%ED%95%98%EB%82%98%EA%B0%80-%EB%91%98%EB%A1%9C-%EA%B0%88%EB%9D%BC%EC%A7%84-%EC%9D%B4%EC%9C%A0&quot;&gt;경계 라우터 하나가 둘로 갈라진 이유&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/Route-53-%E2%80%94-DNS-%EC%84%9C%EB%B2%84-%ED%95%98%EB%82%98%EA%B0%80-%ED%95%98%EB%8D%98-%EC%9D%BC%EC%9D%84-%EC%84%B8-%EA%B0%88%EB%9E%98%EB%A1%9C-%EB%82%98%EB%88%88-%EC%9D%B4%EC%9C%A0&quot;&gt;이 네트워크 안에서 이름을 푸는 법&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://wowpanel.tistory.com/entry/RDS-%E2%80%94-DB-%EC%84%9C%EB%B2%84-%EC%A7%81%EC%A0%91-%EA%B5%AC%EC%B6%95-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B4%80%EB%A6%AC%ED%98%95-%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4&quot;&gt;DB를 어느 서브넷에 둘 것인가&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
      <category>AWS/이게 뭐야?</category>
      <author>와우패널</author>
      <guid isPermaLink="true">https://wowpanel.tistory.com/85</guid>
      <comments>https://wowpanel.tistory.com/entry/VPC-%E2%80%94-%EC%98%A8%ED%94%84%EB%A0%88%EB%AF%B8%EC%8A%A4-%EC%82%AC%EB%82%B4%EB%A7%9D-%EC%84%A4%EA%B3%84-%EA%B0%90%EA%B0%81%EC%9C%BC%EB%A1%9C-%EC%9D%BD%EB%8A%94-AWS%EC%9D%98-%EA%B0%80%EC%83%81-%EB%84%A4%ED%8A%B8%EC%9B%8C%ED%81%AC#entry85comment</comments>
      <pubDate>Mon, 31 Aug 2026 00:28:32 +0900</pubDate>
    </item>
  </channel>
</rss>