<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>Lightsail - MasaruのIT＆マーケティングBLOG | Info Tech &amp; Marketing BLOG by Masaru</title>
	<atom:link href="/tag/lightsail/feed/" rel="self" type="application/rss+xml" />
	<link>/</link>
	<description>Cross the cliffs of the times</description>
	<lastBuildDate>Thu, 12 Aug 2021 06:33:45 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8</generator>
<site xmlns="com-wordpress:feed-additions:1">191177362</site>	<item>
		<title>LightsailのWordPressは3.5ドルプランだと落ちまくる件</title>
		<link>/2021/08/12/lightsail%e3%81%aewordpress%e3%81%af3-5%e3%83%89%e3%83%ab%e3%83%97%e3%83%a9%e3%83%b3%e3%81%a0%e3%81%a8%e8%90%bd%e3%81%a1%e3%81%be%e3%81%8f%e3%82%8b%e4%bb%b6/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=lightsail%25e3%2581%25aewordpress%25e3%2581%25af3-5%25e3%2583%2589%25e3%2583%25ab%25e3%2583%2597%25e3%2583%25a9%25e3%2583%25b3%25e3%2581%25a0%25e3%2581%25a8%25e8%2590%25bd%25e3%2581%25a1%25e3%2581%25be%25e3%2581%258f%25e3%2582%258b%25e4%25bb%25b6</link>
					<comments>/2021/08/12/lightsail%e3%81%aewordpress%e3%81%af3-5%e3%83%89%e3%83%ab%e3%83%97%e3%83%a9%e3%83%b3%e3%81%a0%e3%81%a8%e8%90%bd%e3%81%a1%e3%81%be%e3%81%8f%e3%82%8b%e4%bb%b6/#respond</comments>
		
		<dc:creator><![CDATA[masaru]]></dc:creator>
		<pubDate>Thu, 12 Aug 2021 06:22:00 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Webデザイン]]></category>
		<category><![CDATA[Webマーケティング]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Bitnami]]></category>
		<category><![CDATA[Lightsail]]></category>
		<category><![CDATA[Magento]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">/?p=556</guid>

					<description><![CDATA[<p>メンテナンスのたびにサイトが落ちる 　無職の私は、生活のために100円でも出費を切り詰めなければなりません。WordPressでサイトを再構築した際も、AWSのLightSailは「月額 3.50 USD から」の安さが&#8230; <a class="more-link" href="/2021/08/12/lightsail%e3%81%aewordpress%e3%81%af3-5%e3%83%89%e3%83%ab%e3%83%97%e3%83%a9%e3%83%b3%e3%81%a0%e3%81%a8%e8%90%bd%e3%81%a1%e3%81%be%e3%81%8f%e3%82%8b%e4%bb%b6/">続きを読む <span class="screen-reader-text">LightsailのWordPressは3.5ドルプランだと落ちまくる件</span></a></p>
<p>The post <a href="/2021/08/12/lightsail%e3%81%aewordpress%e3%81%af3-5%e3%83%89%e3%83%ab%e3%83%97%e3%83%a9%e3%83%b3%e3%81%a0%e3%81%a8%e8%90%bd%e3%81%a1%e3%81%be%e3%81%8f%e3%82%8b%e4%bb%b6/">LightsailのWordPressは3.5ドルプランだと落ちまくる件</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>メンテナンスのたびにサイトが落ちる</h2>



<p>　無職の私は、生活のために100円でも出費を切り詰めなければなりません。WordPressでサイトを再構築した際も、AWSの<a href="https://aws.amazon.com/jp/lightsail/" target="_blank" rel="noreferrer noopener">LightSail</a>は「月額 3.50 USD から」の<mark>安さが売り</mark>なので、<mark>迷わず月3.5ドルのコースを選びました</mark>。</p>



<p>　しばらく様子を見ていましたが、1日のアクセス数が30人前後なのでサイトへのアクセス負荷は問題なし。その後、写真や動画を掲載するために別途<a href="https://aws.amazon.com/jp/cloudfront/" target="_blank" rel="noreferrer noopener">CloudFront</a>でCDNを構築して大きなファイルを逃がしたため、ギリギリ乗り切れるだろうと高をくくっていました。</p>



<p>　しかし、その考えは甘かったのです……。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>プラグインの処理で高負荷がかかりサイトが落ちる</h2>



<p>　しかし、サイトを整備してプラグインが増えてきたことから、プラグインの設定変更を伴うメンテナンス作業を行うたびに管理画面がフリーズ状態になり<mark>「サイトが落ちている」という警告メール</mark>がWordPressから届くようになってしまいました。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="491" src="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG1.png?resize=750%2C491&#038;ssl=1" alt="" class="wp-image-558" srcset="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG1.png?resize=1024%2C671&amp;ssl=1 1024w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG1.png?resize=300%2C197&amp;ssl=1 300w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG1.png?resize=768%2C503&amp;ssl=1 768w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG1.png?resize=1536%2C1007&amp;ssl=1 1536w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG1.png?resize=2048%2C1342&amp;ssl=1 2048w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG1.png?resize=1568%2C1028&amp;ssl=1 1568w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG1.png?w=2250&amp;ssl=1 2250w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /><figcaption> プラグインの設定変更を伴うメンテナンス作業を行うたびに管理画面がフリーズ状態になり<mark>「サイトが落ちている」という警告メール</mark>がWordPressから届く </figcaption></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>プラグインがブラックボックスなので、設定変更での問題解決は難しい</h2>



<p>　一般的なWebサーバーやデータベースサーバーなどが高負荷で落ちる場合は、使用メモリなどの設定を変えたりデータを整理することで負荷軽減が可能なこともあります。しかし<mark>プラグインは色々なベンダーから提供されている上に、ブラックボックスで処理内容がユーザーにはよく分かりません</mark>。個別の設定変更では解決が難しいので、泣く泣くLightSailのプランを月3.5ドルから月5ドルにアップグレードすることにしました。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>WordPressでプラグインを使うなら、メモリ1GBは必要</h2>



<figure class="wp-block-image size-full"><img loading="lazy" width="571" height="586" src="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailPlans.png?resize=571%2C586&#038;ssl=1" alt="" class="wp-image-559" srcset="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailPlans.png?w=571&amp;ssl=1 571w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailPlans.png?resize=292%2C300&amp;ssl=1 292w" sizes="(max-width: 571px) 100vw, 571px" data-recalc-dims="1" /></figure>



<p>　LightSailの3.5ドルプランは<mark>メモリが512MB</mark>と「<mark>5年前のスマホかよ</mark>」という少なさです。LightSailのWordPressインスタンスは<a href="https://bitnami.com/stack/wordpress-multisite" target="_blank" rel="noreferrer noopener">bitnamiスタック</a>というシステム構成でOSはDebian Linux。GUIが無くCUI操作なので512MBでも動作はします。しかしギリギリなので、重い処理をするとメモリ不足で処理が止まってしまいます。CPUは遅くても待てば済むことが多いのですが、メモリ不足は致命的です。</p>



<p>　<mark>今時のVPSでは<a href="https://cloud.google.com/free/docs/gcp-free-tier/?hl=ja#compute" target="_blank" rel="noreferrer noopener">GCP</a>や<a href="https://www.oracle.com/jp/cloud/free/" target="_blank" rel="noreferrer noopener">OCI</a>など大手がメモリ1GBのVMを無料で提供しています</mark>。プラグイン作者もメモリ消費を考慮してはいるはずですが、既に「<mark>WordPressを立てるならメモリ1GBがミニマム</mark>」と判断されていると思われます。ソシャゲの肥大化と同じですね<img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f62d.png" alt="😭" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>LightSailがメモリ512MBでWordPressインスタンスを立てられてしまう理由</h2>



<p>　天下のAWS、WordPressでちょっと欲張ると3.5ドルプランでは管理しきれなくなることを知らないはずがありません。しかし実際には3.5ドルプランでWordPressインスタンスを立てられてしまい、私のように管理画面が落ちることになってしまいます。</p>



<p>　これは、LightSailが『OS／アプリケーションスタック』と『インスタンスプラン』を一切紐づけておらず、全ての組み合わせでインスタンスを立てられるのが理由です。端的に言えば、プラン選択もアプリ選択も『自助』『自己責任』という考え方でサービスが構築されている、ということです。</p>



<p>　WordPressはまだ512MBでも動きはしますが、ショッピングカートの『<a href="https://aws.amazon.com/jp/lightsail/projects/#Ecommerce" target="_blank" rel="noreferrer noopener">Magento</a>』では<a href="https://awstip.com/setting-up-magento-2-website-on-aws-lightsail-with-aws-ses-and-ci-cd-on-gitlab-2021-42f63a65abb0" target="_blank" rel="noreferrer noopener">アップデートに2GBのメモリが必要</a>で、512MBでは初期設定すらまともに出来ません(月10ドルのプランなら動くでしょう、たぶん)。このように、<mark>自分が使いたいアプリと用途でちゃんと動くミニマムのプランを見極めてから始める</mark>のが基本です。</p>



<p>　とは言え、サービスが落ちると致命的な企業サイトでなければ「<mark>とりあえず立ててみて、ダメそうならスナップショットを取ってアップグレードする</mark>」という「痛い目に遭って覚える」やり方もアリでしょう(負け惜しみ)。ボタンひとつでサーバーを落として引っ越せるため失敗のダメージが少ないのはクラウドの長所です。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>泣く泣く月5ドルのプランに移行する</h2>



<p>　というわけで、無職で経済的に厳しい折ではありますが、月3.5ドルのプランから月5ドルのプランに移行することにしました。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>手順①　スナップショットの作成</h2>



<p>　LightSailは、<mark>システムの再構築なしにプラン変更が可能</mark>です。具体的には、まず既存インスタンスのスナップショットを取ります。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="267" src="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG2.png?resize=750%2C267&#038;ssl=1" alt="" class="wp-image-560" srcset="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG2.png?resize=1024%2C364&amp;ssl=1 1024w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG2.png?resize=300%2C107&amp;ssl=1 300w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG2.png?resize=768%2C273&amp;ssl=1 768w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG2.png?w=1294&amp;ssl=1 1294w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>手順②　スナップショットから新規インスタンスを作成</h2>



<p>　スナップショットが出来たら、クリックして『新規インスタンスの作成』を選びます。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="388" src="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG3.png?resize=750%2C388&#038;ssl=1" alt="" class="wp-image-561" srcset="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG3.png?resize=1024%2C530&amp;ssl=1 1024w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG3.png?resize=300%2C155&amp;ssl=1 300w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG3.png?resize=768%2C397&amp;ssl=1 768w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG3.png?w=1463&amp;ssl=1 1463w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /><figcaption>手動スナップショットを作成し、スナップショットから新規インスタンスを作成する</figcaption></figure>



<p>　古いスナップショットを使うと先祖返りしてしまうので、アップグレードしたいインスタンスの最新のスナップショットであることを再確認します。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="420" src="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG4.png?resize=750%2C420&#038;ssl=1" alt="" class="wp-image-562" srcset="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG4.png?resize=1024%2C573&amp;ssl=1 1024w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG4.png?resize=300%2C168&amp;ssl=1 300w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG4.png?resize=768%2C430&amp;ssl=1 768w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG4.png?resize=1536%2C859&amp;ssl=1 1536w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG4.png?resize=2048%2C1146&amp;ssl=1 2048w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG4.png?resize=1568%2C877&amp;ssl=1 1568w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG4.png?w=2250&amp;ssl=1 2250w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>手順③　月5ドルのインスタンスプランを選んで作成</h2>



<p>　『新規インスタンスプランの選択』で、左から2番目の『$5 USD』のプランを選びます。<mark>メモリが1GB</mark>と倍増するほか、ストレージ40GB、転送量2TBと全体的にスペックが倍増します。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="478" src="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG5.png?resize=750%2C478&#038;ssl=1" alt="" class="wp-image-564" srcset="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG5.png?resize=1024%2C653&amp;ssl=1 1024w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG5.png?resize=300%2C191&amp;ssl=1 300w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG5.png?resize=768%2C490&amp;ssl=1 768w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG5.png?resize=1536%2C979&amp;ssl=1 1536w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG5.png?resize=1568%2C1000&amp;ssl=1 1568w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG5.png?w=1650&amp;ssl=1 1650w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<p>　一時的に同じ中身のインスタンスが2つ併存する状況となります。固定IPアドレスが古いインスタンスに紐づけられているので、新しいインスタンスはまだ公開されていない状況です。</p>



<figure class="wp-block-image size-full"><img loading="lazy" width="750" height="680" src="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG6.png?resize=750%2C680&#038;ssl=1" alt="" class="wp-image-563" srcset="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG6.png?w=1008&amp;ssl=1 1008w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG6.png?resize=300%2C272&amp;ssl=1 300w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG6.png?resize=768%2C696&amp;ssl=1 768w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>手順④　固定IPアドレスの付け替え</h2>



<p>　『静的パブリックIPアドレス』の管理画面で古いインスタンスから固定IPアドレスの割り当てを『デタッチ』で解除します。この操作に伴って一時的にサイトが落ちるので、アクセスが少ない時間帯に実施するのが無難です。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="555" src="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG7.png?resize=750%2C555&#038;ssl=1" alt="" class="wp-image-568" srcset="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG7.png?resize=1024%2C758&amp;ssl=1 1024w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG7.png?resize=300%2C222&amp;ssl=1 300w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG7.png?resize=768%2C568&amp;ssl=1 768w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG7.png?resize=1536%2C1137&amp;ssl=1 1536w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG7.png?resize=1568%2C1160&amp;ssl=1 1568w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG7.png?w=1608&amp;ssl=1 1608w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<p>　続いて、固定IPアドレスを新しいインスタンスに紐づけます。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="544" src="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG8.png?resize=750%2C544&#038;ssl=1" alt="" class="wp-image-569" srcset="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG8.png?resize=1024%2C743&amp;ssl=1 1024w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG8.png?resize=300%2C218&amp;ssl=1 300w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG8.png?resize=768%2C557&amp;ssl=1 768w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG8.png?resize=1536%2C1115&amp;ssl=1 1536w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG8.png?w=1553&amp;ssl=1 1553w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<p>　アタッチが終わったら、Webブラウザでサイトが無事表示されていることを確認します。キャッシュの影響でサイトが落ちていても表示されてしまうことがあるので、動作確認は他のブラウザやスマホを使うかキャッシュを削除してから行うのが安全です。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="472" src="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/image.png?resize=750%2C472&#038;ssl=1" alt="" class="wp-image-567" srcset="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/image.png?resize=1024%2C645&amp;ssl=1 1024w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/image.png?resize=300%2C189&amp;ssl=1 300w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/image.png?resize=768%2C484&amp;ssl=1 768w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/image.png?resize=1536%2C968&amp;ssl=1 1536w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/image.png?resize=2048%2C1291&amp;ssl=1 2048w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/image.png?resize=1568%2C988&amp;ssl=1 1568w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/image.png?w=2250&amp;ssl=1 2250w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>手順⑤　古いインスタンスの削除</h2>



<p>　インスタンスがふたつ併存した状態では二重に課金されてしまうので、古いインスタンスを削除します。インスタンスを削除すると自動スナップショットも同時に削除されるので気を付けましょう。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="654" src="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG10.png?resize=750%2C654&#038;ssl=1" alt="" class="wp-image-566" srcset="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG10.png?resize=1024%2C893&amp;ssl=1 1024w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG10.png?resize=300%2C261&amp;ssl=1 300w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG10.png?resize=768%2C669&amp;ssl=1 768w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG10.png?w=1145&amp;ssl=1 1145w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>手順⑥　手動スナップショット作成と自動スナップショットの設定</h2>



<p>　インスタンスを作り直すとスナップショットの設定も消えてしまいますので、作り直します。念のため、手動スナップショットも作成しておいた方が良いでしょう。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="605" src="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG11.png?resize=750%2C605&#038;ssl=1" alt="" class="wp-image-565" srcset="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG11.png?resize=1024%2C826&amp;ssl=1 1024w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG11.png?resize=300%2C242&amp;ssl=1 300w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG11.png?resize=768%2C619&amp;ssl=1 768w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG11.png?w=1468&amp;ssl=1 1468w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>メモリが1GBになったが、それでもギリギリ感が……</h2>



<p>　新しいインスタンスのメモリ使用状況を確認すると、メモリ1GBでも128MBしかメモリが余っていません。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="662" src="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG12.png?resize=750%2C662&#038;ssl=1" alt="" class="wp-image-570" srcset="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG12.png?resize=1024%2C904&amp;ssl=1 1024w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG12.png?resize=300%2C265&amp;ssl=1 300w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG12.png?resize=768%2C678&amp;ssl=1 768w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG12.png?resize=1536%2C1356&amp;ssl=1 1536w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG12.png?resize=2048%2C1809&amp;ssl=1 2048w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/08/LightSailUPG12.png?resize=1568%2C1385&amp;ssl=1 1568w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<p>　スワップがあるとは言え、データがSSDに落ちると処理速度が大幅に下がってしまいます。スワップ処理がフリーズにつながることもあるので、やはり最低限メモリ1GBはあった方が良いでしょう。もちろん、その分お高くつきますが……<img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f62d.png" alt="😭" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="いいねボタン"
					data-ulike-id="556"
					data-ulike-nonce="82dd6ea804"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_556"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>
	<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=%2F2021%2F08%2F12%2Flightsail%25e3%2581%25aewordpress%25e3%2581%25af3-5%25e3%2583%2589%25e3%2583%25ab%25e3%2583%2597%25e3%2583%25a9%25e3%2583%25b3%25e3%2581%25a0%25e3%2581%25a8%25e8%2590%25bd%25e3%2581%25a1%25e3%2581%25be%25e3%2581%258f%25e3%2582%258b%25e4%25bb%25b6%2F&amp;linkname=Lightsail%E3%81%AEWordPress%E3%81%AF3.5%E3%83%89%E3%83%AB%E3%83%97%E3%83%A9%E3%83%B3%E3%81%A0%E3%81%A8%E8%90%BD%E3%81%A1%E3%81%BE%E3%81%8F%E3%82%8B%E4%BB%B6" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_line" href="https://www.addtoany.com/add_to/line?linkurl=%2F2021%2F08%2F12%2Flightsail%25e3%2581%25aewordpress%25e3%2581%25af3-5%25e3%2583%2589%25e3%2583%25ab%25e3%2583%2597%25e3%2583%25a9%25e3%2583%25b3%25e3%2581%25a0%25e3%2581%25a8%25e8%2590%25bd%25e3%2581%25a1%25e3%2581%25be%25e3%2581%258f%25e3%2582%258b%25e4%25bb%25b6%2F&amp;linkname=Lightsail%E3%81%AEWordPress%E3%81%AF3.5%E3%83%89%E3%83%AB%E3%83%97%E3%83%A9%E3%83%B3%E3%81%A0%E3%81%A8%E8%90%BD%E3%81%A1%E3%81%BE%E3%81%8F%E3%82%8B%E4%BB%B6" title="Line" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=%2F2021%2F08%2F12%2Flightsail%25e3%2581%25aewordpress%25e3%2581%25af3-5%25e3%2583%2589%25e3%2583%25ab%25e3%2583%2597%25e3%2583%25a9%25e3%2583%25b3%25e3%2581%25a0%25e3%2581%25a8%25e8%2590%25bd%25e3%2581%25a1%25e3%2581%25be%25e3%2581%258f%25e3%2582%258b%25e4%25bb%25b6%2F&amp;linkname=Lightsail%E3%81%AEWordPress%E3%81%AF3.5%E3%83%89%E3%83%AB%E3%83%97%E3%83%A9%E3%83%B3%E3%81%A0%E3%81%A8%E8%90%BD%E3%81%A1%E3%81%BE%E3%81%8F%E3%82%8B%E4%BB%B6" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook_messenger" href="https://www.addtoany.com/add_to/facebook_messenger?linkurl=%2F2021%2F08%2F12%2Flightsail%25e3%2581%25aewordpress%25e3%2581%25af3-5%25e3%2583%2589%25e3%2583%25ab%25e3%2583%2597%25e3%2583%25a9%25e3%2583%25b3%25e3%2581%25a0%25e3%2581%25a8%25e8%2590%25bd%25e3%2581%25a1%25e3%2581%25be%25e3%2581%258f%25e3%2582%258b%25e4%25bb%25b6%2F&amp;linkname=Lightsail%E3%81%AEWordPress%E3%81%AF3.5%E3%83%89%E3%83%AB%E3%83%97%E3%83%A9%E3%83%B3%E3%81%A0%E3%81%A8%E8%90%BD%E3%81%A1%E3%81%BE%E3%81%8F%E3%82%8B%E4%BB%B6" title="Messenger" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=%2F2021%2F08%2F12%2Flightsail%25e3%2581%25aewordpress%25e3%2581%25af3-5%25e3%2583%2589%25e3%2583%25ab%25e3%2583%2597%25e3%2583%25a9%25e3%2583%25b3%25e3%2581%25a0%25e3%2581%25a8%25e8%2590%25bd%25e3%2581%25a1%25e3%2581%25be%25e3%2581%258f%25e3%2582%258b%25e4%25bb%25b6%2F&amp;linkname=Lightsail%E3%81%AEWordPress%E3%81%AF3.5%E3%83%89%E3%83%AB%E3%83%97%E3%83%A9%E3%83%B3%E3%81%A0%E3%81%A8%E8%90%BD%E3%81%A1%E3%81%BE%E3%81%8F%E3%82%8B%E4%BB%B6" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=%2F2021%2F08%2F12%2Flightsail%25e3%2581%25aewordpress%25e3%2581%25af3-5%25e3%2583%2589%25e3%2583%25ab%25e3%2583%2597%25e3%2583%25a9%25e3%2583%25b3%25e3%2581%25a0%25e3%2581%25a8%25e8%2590%25bd%25e3%2581%25a1%25e3%2581%25be%25e3%2581%258f%25e3%2582%258b%25e4%25bb%25b6%2F&#038;title=Lightsail%E3%81%AEWordPress%E3%81%AF3.5%E3%83%89%E3%83%AB%E3%83%97%E3%83%A9%E3%83%B3%E3%81%A0%E3%81%A8%E8%90%BD%E3%81%A1%E3%81%BE%E3%81%8F%E3%82%8B%E4%BB%B6" data-a2a-url="/2021/08/12/lightsail%e3%81%aewordpress%e3%81%af3-5%e3%83%89%e3%83%ab%e3%83%97%e3%83%a9%e3%83%b3%e3%81%a0%e3%81%a8%e8%90%bd%e3%81%a1%e3%81%be%e3%81%8f%e3%82%8b%e4%bb%b6/" data-a2a-title="LightsailのWordPressは3.5ドルプランだと落ちまくる件"></a></p><p>The post <a href="/2021/08/12/lightsail%e3%81%aewordpress%e3%81%af3-5%e3%83%89%e3%83%ab%e3%83%97%e3%83%a9%e3%83%b3%e3%81%a0%e3%81%a8%e8%90%bd%e3%81%a1%e3%81%be%e3%81%8f%e3%82%8b%e4%bb%b6/">LightsailのWordPressは3.5ドルプランだと落ちまくる件</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>/2021/08/12/lightsail%e3%81%aewordpress%e3%81%af3-5%e3%83%89%e3%83%ab%e3%83%97%e3%83%a9%e3%83%b3%e3%81%a0%e3%81%a8%e8%90%bd%e3%81%a1%e3%81%be%e3%81%8f%e3%82%8b%e4%bb%b6/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">556</post-id>	</item>
		<item>
		<title>CloudFront+LightSailでスケーラビリティが(それなりに)あるサイトを安く作る</title>
		<link>/2021/04/16/cloudfrontlightsail%e3%81%a7%e3%82%b9%e3%82%b1%e3%83%bc%e3%83%a9%e3%83%93%e3%83%aa%e3%83%86%e3%82%a3%e3%81%8c%e3%81%9d%e3%82%8c%e3%81%aa%e3%82%8a%e3%81%ab%e3%81%82%e3%82%8b%e3%82%b5%e3%82%a4/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b9%25e3%2582%25b1%25e3%2583%25bc%25e3%2583%25a9%25e3%2583%2593%25e3%2583%25aa%25e3%2583%2586%25e3%2582%25a3%25e3%2581%258c%25e3%2581%259d%25e3%2582%258c%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25ab%25e3%2581%2582%25e3%2582%258b%25e3%2582%25b5%25e3%2582%25a4</link>
					<comments>/2021/04/16/cloudfrontlightsail%e3%81%a7%e3%82%b9%e3%82%b1%e3%83%bc%e3%83%a9%e3%83%93%e3%83%aa%e3%83%86%e3%82%a3%e3%81%8c%e3%81%9d%e3%82%8c%e3%81%aa%e3%82%8a%e3%81%ab%e3%81%82%e3%82%8b%e3%82%b5%e3%82%a4/#respond</comments>
		
		<dc:creator><![CDATA[masaru]]></dc:creator>
		<pubDate>Fri, 16 Apr 2021 08:33:46 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Webマーケティング]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[Cloudflare]]></category>
		<category><![CDATA[Cloudfront]]></category>
		<category><![CDATA[Lightsail]]></category>
		<category><![CDATA[Route 53]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[エッジサーバー]]></category>
		<category><![CDATA[オリジンサーバー]]></category>
		<category><![CDATA[コンテンツ配信]]></category>
		<guid isPermaLink="false">/?p=412</guid>

					<description><![CDATA[<p>敢えてサイト丸ごとCDNにしない 　can.ne.jpではサイトを丸ごとCDN(配信サービス)で配信しないようにしています。CloudFrontなどのCDNはそれなりにお高い上に、フォームを置いたインタラクティブなサイト&#8230; <a class="more-link" href="/2021/04/16/cloudfrontlightsail%e3%81%a7%e3%82%b9%e3%82%b1%e3%83%bc%e3%83%a9%e3%83%93%e3%83%aa%e3%83%86%e3%82%a3%e3%81%8c%e3%81%9d%e3%82%8c%e3%81%aa%e3%82%8a%e3%81%ab%e3%81%82%e3%82%8b%e3%82%b5%e3%82%a4/">続きを読む <span class="screen-reader-text">CloudFront+LightSailでスケーラビリティが(それなりに)あるサイトを安く作る</span></a></p>
<p>The post <a href="/2021/04/16/cloudfrontlightsail%e3%81%a7%e3%82%b9%e3%82%b1%e3%83%bc%e3%83%a9%e3%83%93%e3%83%aa%e3%83%86%e3%82%a3%e3%81%8c%e3%81%9d%e3%82%8c%e3%81%aa%e3%82%8a%e3%81%ab%e3%81%82%e3%82%8b%e3%82%b5%e3%82%a4/">CloudFront+LightSailでスケーラビリティが(それなりに)あるサイトを安く作る</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>敢えてサイト丸ごとCDNにしない</h2>



<p>　can.ne.jpではサイトを丸ごとCDN(配信サービス)で配信しないようにしています。CloudFrontなどのCDNはそれなりにお高い上に、フォームを置いたインタラクティブなサイトでトラブルが生じる可能性を否定出来ないからです。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>動画や画像だけCDNに置く</h2>



<p>　can.ne.jpが使っているWordPressというCMSは基本的にはローカルでファイルを管理します。ただし、『HTMLブロック』機能でリンクを手書きすれば外部の画像を表示出来ます。</p>



<p>　また、WordPressプラグインの動画プレイヤー『<a href="https://ja.wordpress.org/plugins/fv-wordpress-flowplayer/" target="_blank" rel="noreferrer noopener">FV Flowplayer Video Player</a>』や音声プレイヤー『<a href="https://ja.wordpress.org/plugins/mp3-music-player-by-sonaar/" target="_blank" rel="noreferrer noopener">MP3 Music Player by Sonaar</a>』はURL指定で外部ファイルを再生できます。</p>



<p>　これらを使うことで、ファイルサイズが大きい動画や画像だけをCDNに置くことが出来ます。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>2サーバー＋CloudFront構成で大きなファイルだけCDN配信する</h2>



<p>　これらを念頭に置いて構築したcan.ne.jpの構成図は下記となります。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="422" src="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/cloudFront_can.png?resize=750%2C422&#038;ssl=1" alt="can.ne.jpのCDN構成図" class="wp-image-413" srcset="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/cloudFront_can.png?resize=1024%2C576&amp;ssl=1 1024w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/cloudFront_can.png?resize=300%2C169&amp;ssl=1 300w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/cloudFront_can.png?resize=768%2C432&amp;ssl=1 768w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/cloudFront_can.png?w=1280&amp;ssl=1 1280w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<p>　まず、WordPress MultiSiteを設置したブログサーバー(can.ne.jp)とは別に配信サーバー(cloudfront.can.ne.jp)をLightSailで作ります。ただのファイル置き場なのでCMSなどは動かさず、Webサーバーも高速と言われるNginxを選びました。このようなサーバーを『オリジンサーバー』と呼びます。オリジンサーバーは外部からのアクセスを想定しないため、SSL証明書は不要です。</p>



<p>　次に、CloudFrontのインスタンス(cf.can.ne.jp)を作成してSSL証明書を取得します。can.ne.jpのドメインはAWSのDNSサーバー『Route 53』に置いているので、cf.can.ne.jpへのアクセスをCloudFrontに流し込む設定を簡単に行えます。</p>



<p>　なお、CloudFrontのようにサイト訪問者に最寄りから高速にデータを配信するサーバーを『エッジサーバー』と呼びます。各種設定の際は、オリジンサーバーとエッジサーバーが別のサーバー名(FQDN)になる点に気を付けて下さい。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>Amazonの回し者のような図をついに描いてしまいましたが</h2>



<p>　AWSがAmazonの利益率が高い事業であることは知っているので、AWSが決して『最安』ではないとの認識です(Amazonの商品が必ずしも最安ではないように)。</p>



<p>　CDNの導入にあたっては、<a href="https://www.cloudflare.com/ja-jp/" target="_blank" rel="noreferrer noopener">無料枠があるCloudflare</a>も検討しました。しかしDNSをRoute 53からCloudflareに移さなければならないことが分かったため断念しました。とにかく安くサイトを運営したいなら、DNSを設置する段階からCloudflareを選んでおくのが良いと思います。</p>



<p>　また、CDNを選ぶ際はエッジサーバーが<strong>日本国内で</strong>どの程度配備されているかが重要なポイントとなります。個人サイトなら落ちさえしなければ遅くても構いません(笑)。しかしビジネス目的なら<strong>国内に</strong>多数のエッジロケーションがあるかどうかが配信速度を左右しますので、無難にCloudFrontや、お高いことで有名なAxxxxxなど有名なサービスを選ぶことになると思います。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>CDNは「逃げられるようにしておく」のが大事</h2>



<p>　ロートルWeb担当者なら身に覚えがあるかも知れませんが、昔はCDNと言えばAxxxxx社だったので、CDNを入れるイコール「青天井の予算を組む」という恐ろしいタスクでした。</p>



<p>　特に企業サイトでは新製品発表など訪問者がスパイクするタイミングで波の大きさがどれくらいになるか、なかなか読めないものです。発表日にはCDNのコンソール画面に貼りついて、アクセスが殺到して予算超過にならないか見張らなければなりません。</p>



<p>　「いよいよ予算的にヤバイ」となれば、泣きながら手動でリンクをオリジンサーバーに付け替えるわけです。これでサーバーが重くなったり最悪落ちるかも知れませんが、CDNの青天井課金から逃げることだけは出来ます。</p>



<p>　「そもそもアクセスが殺到しても耐えられるくらい予算を確保(できる会社に就職)しておけよ」という正論が聞こえてきますが、悲しきかな日本の社畜はそうも行かないのが常です。保身の手段として覚えておくと良い、かも知れません。</p>
		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="いいねボタン"
					data-ulike-id="412"
					data-ulike-nonce="717501f8b6"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_412"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>
	<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=%2F2021%2F04%2F16%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b9%25e3%2582%25b1%25e3%2583%25bc%25e3%2583%25a9%25e3%2583%2593%25e3%2583%25aa%25e3%2583%2586%25e3%2582%25a3%25e3%2581%258c%25e3%2581%259d%25e3%2582%258c%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25ab%25e3%2581%2582%25e3%2582%258b%25e3%2582%25b5%25e3%2582%25a4%2F&amp;linkname=CloudFront%2BLightSail%E3%81%A7%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%A9%E3%83%93%E3%83%AA%E3%83%86%E3%82%A3%E3%81%8C%28%E3%81%9D%E3%82%8C%E3%81%AA%E3%82%8A%E3%81%AB%29%E3%81%82%E3%82%8B%E3%82%B5%E3%82%A4%E3%83%88%E3%82%92%E5%AE%89%E3%81%8F%E4%BD%9C%E3%82%8B" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_line" href="https://www.addtoany.com/add_to/line?linkurl=%2F2021%2F04%2F16%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b9%25e3%2582%25b1%25e3%2583%25bc%25e3%2583%25a9%25e3%2583%2593%25e3%2583%25aa%25e3%2583%2586%25e3%2582%25a3%25e3%2581%258c%25e3%2581%259d%25e3%2582%258c%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25ab%25e3%2581%2582%25e3%2582%258b%25e3%2582%25b5%25e3%2582%25a4%2F&amp;linkname=CloudFront%2BLightSail%E3%81%A7%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%A9%E3%83%93%E3%83%AA%E3%83%86%E3%82%A3%E3%81%8C%28%E3%81%9D%E3%82%8C%E3%81%AA%E3%82%8A%E3%81%AB%29%E3%81%82%E3%82%8B%E3%82%B5%E3%82%A4%E3%83%88%E3%82%92%E5%AE%89%E3%81%8F%E4%BD%9C%E3%82%8B" title="Line" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=%2F2021%2F04%2F16%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b9%25e3%2582%25b1%25e3%2583%25bc%25e3%2583%25a9%25e3%2583%2593%25e3%2583%25aa%25e3%2583%2586%25e3%2582%25a3%25e3%2581%258c%25e3%2581%259d%25e3%2582%258c%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25ab%25e3%2581%2582%25e3%2582%258b%25e3%2582%25b5%25e3%2582%25a4%2F&amp;linkname=CloudFront%2BLightSail%E3%81%A7%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%A9%E3%83%93%E3%83%AA%E3%83%86%E3%82%A3%E3%81%8C%28%E3%81%9D%E3%82%8C%E3%81%AA%E3%82%8A%E3%81%AB%29%E3%81%82%E3%82%8B%E3%82%B5%E3%82%A4%E3%83%88%E3%82%92%E5%AE%89%E3%81%8F%E4%BD%9C%E3%82%8B" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook_messenger" href="https://www.addtoany.com/add_to/facebook_messenger?linkurl=%2F2021%2F04%2F16%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b9%25e3%2582%25b1%25e3%2583%25bc%25e3%2583%25a9%25e3%2583%2593%25e3%2583%25aa%25e3%2583%2586%25e3%2582%25a3%25e3%2581%258c%25e3%2581%259d%25e3%2582%258c%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25ab%25e3%2581%2582%25e3%2582%258b%25e3%2582%25b5%25e3%2582%25a4%2F&amp;linkname=CloudFront%2BLightSail%E3%81%A7%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%A9%E3%83%93%E3%83%AA%E3%83%86%E3%82%A3%E3%81%8C%28%E3%81%9D%E3%82%8C%E3%81%AA%E3%82%8A%E3%81%AB%29%E3%81%82%E3%82%8B%E3%82%B5%E3%82%A4%E3%83%88%E3%82%92%E5%AE%89%E3%81%8F%E4%BD%9C%E3%82%8B" title="Messenger" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=%2F2021%2F04%2F16%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b9%25e3%2582%25b1%25e3%2583%25bc%25e3%2583%25a9%25e3%2583%2593%25e3%2583%25aa%25e3%2583%2586%25e3%2582%25a3%25e3%2581%258c%25e3%2581%259d%25e3%2582%258c%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25ab%25e3%2581%2582%25e3%2582%258b%25e3%2582%25b5%25e3%2582%25a4%2F&amp;linkname=CloudFront%2BLightSail%E3%81%A7%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%A9%E3%83%93%E3%83%AA%E3%83%86%E3%82%A3%E3%81%8C%28%E3%81%9D%E3%82%8C%E3%81%AA%E3%82%8A%E3%81%AB%29%E3%81%82%E3%82%8B%E3%82%B5%E3%82%A4%E3%83%88%E3%82%92%E5%AE%89%E3%81%8F%E4%BD%9C%E3%82%8B" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=%2F2021%2F04%2F16%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b9%25e3%2582%25b1%25e3%2583%25bc%25e3%2583%25a9%25e3%2583%2593%25e3%2583%25aa%25e3%2583%2586%25e3%2582%25a3%25e3%2581%258c%25e3%2581%259d%25e3%2582%258c%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25ab%25e3%2581%2582%25e3%2582%258b%25e3%2582%25b5%25e3%2582%25a4%2F&#038;title=CloudFront%2BLightSail%E3%81%A7%E3%82%B9%E3%82%B1%E3%83%BC%E3%83%A9%E3%83%93%E3%83%AA%E3%83%86%E3%82%A3%E3%81%8C%28%E3%81%9D%E3%82%8C%E3%81%AA%E3%82%8A%E3%81%AB%29%E3%81%82%E3%82%8B%E3%82%B5%E3%82%A4%E3%83%88%E3%82%92%E5%AE%89%E3%81%8F%E4%BD%9C%E3%82%8B" data-a2a-url="/2021/04/16/cloudfrontlightsail%e3%81%a7%e3%82%b9%e3%82%b1%e3%83%bc%e3%83%a9%e3%83%93%e3%83%aa%e3%83%86%e3%82%a3%e3%81%8c%e3%81%9d%e3%82%8c%e3%81%aa%e3%82%8a%e3%81%ab%e3%81%82%e3%82%8b%e3%82%b5%e3%82%a4/" data-a2a-title="CloudFront+LightSailでスケーラビリティが(それなりに)あるサイトを安く作る"></a></p><p>The post <a href="/2021/04/16/cloudfrontlightsail%e3%81%a7%e3%82%b9%e3%82%b1%e3%83%bc%e3%83%a9%e3%83%93%e3%83%aa%e3%83%86%e3%82%a3%e3%81%8c%e3%81%9d%e3%82%8c%e3%81%aa%e3%82%8a%e3%81%ab%e3%81%82%e3%82%8b%e3%82%b5%e3%82%a4/">CloudFront+LightSailでスケーラビリティが(それなりに)あるサイトを安く作る</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>/2021/04/16/cloudfrontlightsail%e3%81%a7%e3%82%b9%e3%82%b1%e3%83%bc%e3%83%a9%e3%83%93%e3%83%aa%e3%83%86%e3%82%a3%e3%81%8c%e3%81%9d%e3%82%8c%e3%81%aa%e3%82%8a%e3%81%ab%e3%81%82%e3%82%8b%e3%82%b5%e3%82%a4/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">412</post-id>	</item>
		<item>
		<title>Cloudfront+LightSailでコンテンツ配信サービス(CDN)を作る</title>
		<link>/2021/04/12/cloudfrontlightsail%e3%81%a7%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e9%85%8d%e4%bf%a1%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9cdn%e3%82%92%e4%bd%9c%e3%82%8b/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=cloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b3%25e3%2583%25b3%25e3%2583%2586%25e3%2583%25b3%25e3%2583%2584%25e9%2585%258d%25e4%25bf%25a1%25e3%2582%25b5%25e3%2583%25bc%25e3%2583%2593%25e3%2582%25b9cdn%25e3%2582%2592%25e4%25bd%259c%25e3%2582%258b</link>
					<comments>/2021/04/12/cloudfrontlightsail%e3%81%a7%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e9%85%8d%e4%bf%a1%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9cdn%e3%82%92%e4%bd%9c%e3%82%8b/#respond</comments>
		
		<dc:creator><![CDATA[masaru]]></dc:creator>
		<pubDate>Mon, 12 Apr 2021 10:00:39 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Webマーケティング]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[Certificate Manager]]></category>
		<category><![CDATA[Cloudfront]]></category>
		<category><![CDATA[Lightsail]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[Route 53]]></category>
		<category><![CDATA[コンテンツ配信]]></category>
		<guid isPermaLink="false">/?p=389</guid>

					<description><![CDATA[<p>自前主義なら動画まで 　「自前主義で行こう」と独自ドメインでサイトを再開した私ですが、動画はYouTube先生に依存しています。動画はファイルが大きいので自分のサイトに置くのは正直怖いのですが、自前主義をテーマにしてみた&#8230; <a class="more-link" href="/2021/04/12/cloudfrontlightsail%e3%81%a7%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e9%85%8d%e4%bf%a1%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9cdn%e3%82%92%e4%bd%9c%e3%82%8b/">続きを読む <span class="screen-reader-text">Cloudfront+LightSailでコンテンツ配信サービス(CDN)を作る</span></a></p>
<p>The post <a href="/2021/04/12/cloudfrontlightsail%e3%81%a7%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e9%85%8d%e4%bf%a1%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9cdn%e3%82%92%e4%bd%9c%e3%82%8b/">Cloudfront+LightSailでコンテンツ配信サービス(CDN)を作る</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>自前主義なら動画まで</h2>



<p>　「自前主義で行こう」と独自ドメインでサイトを再開した私ですが、動画は<a href="https://www.youtube.com/channel/UCd3DAD-J-ThujX9_a22KqSA" target="_blank" rel="noreferrer noopener">YouTube先生に依存</a>しています。動画はファイルが大きいので自分のサイトに置くのは正直怖いのですが、自前主義をテーマにしてみたので動画もサイトに置いてみることにしました。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>LightSailは安いがしょぼい</h2>



<p>　<a href="https://aws.amazon.com/jp/lightsail/" target="_blank" rel="noreferrer noopener">LightSail</a>はAmazonの格安ホスティングサービスで「月額 3.50 USD から」が売りです。お財布に余裕が無い私は迷わず3.5ドルコースを選びましたが、スペックは下記のようなものです。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="393" src="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/three_point_five_dollors.png?resize=750%2C393&#038;ssl=1" alt="" class="wp-image-398" srcset="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/three_point_five_dollors.png?resize=1024%2C536&amp;ssl=1 1024w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/three_point_five_dollors.png?resize=300%2C157&amp;ssl=1 300w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/three_point_five_dollors.png?resize=768%2C402&amp;ssl=1 768w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/three_point_five_dollors.png?w=1480&amp;ssl=1 1480w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<p>　うちのパソコンよりしょぼいです<img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f4a6.png" alt="💦" class="wp-smiley" style="height: 1em; max-height: 1em;" />　無名サイトなので余裕ではあるのですが、動画を置くのは怖い。というわけで、Amazonのコンテンツ配信サービス(CDN)　『CloudFront』を入れてみることにしました。</p>



<p>　CloudFrontはWebサーバーのファイルをキャッシュして配信を代行してくれるサービスです。<a href="https://codezine.jp/article/detail/13741" target="_blank" rel="noreferrer noopener">CodeZine</a>によれば「<strong>東京における16のCloudFrontエッジロケーション</strong>および1つのCloudFrontリージョナルエッジキャッシュ、2つのAWS Direct Connectロケーション、<strong>大阪における1つのCloudFrontエッジロケーション</strong>、および1つのDirect Connectロケーション」とあり、2021年3月時点で日本国内に17か所の配信サーバーがあります。</p>



<p>　これならWebサーバーがしょぼいままでも、動画をCloudFrontに置けば、万が一アクセスが増えてもサーバーが落ちる事態は防げそうです。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>で、CloudFrontはナンボなの？</h2>



<p>　「でも、お高いんでしょう？」</p>



<p>　特に仕事でアカマイなどのCDNを入れたことがある方は、とても、とても心配になると思います。実際、企業向けのサービスなので<a href="https://aws.amazon.com/jp/cloudfront/pricing/" target="_blank" rel="noreferrer noopener">多少の出費は覚悟する必要があります</a>。具体的には、</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="465" src="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/CloudFront-Price.png?resize=750%2C465&#038;ssl=1" alt="" class="wp-image-399" srcset="https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/CloudFront-Price.png?resize=1024%2C635&amp;ssl=1 1024w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/CloudFront-Price.png?resize=300%2C186&amp;ssl=1 300w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/CloudFront-Price.png?resize=768%2C476&amp;ssl=1 768w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/CloudFront-Price.png?resize=1536%2C953&amp;ssl=1 1536w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/CloudFront-Price.png?resize=2048%2C1271&amp;ssl=1 2048w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/CloudFront-Price.png?resize=1568%2C973&amp;ssl=1 1568w, https://i0.wp.com/can.ne.jp/wp-content/uploads/2021/04/CloudFront-Price.png?w=2250&amp;ssl=1 2250w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<p>　日本向けの料金が1GBあたり0.114ドルです。20MBの動画が月間1万再生されると約200GBになりますので、月22.8ドルになります。</p>



<p>「やはり、お高い……」</p>



<p>　しかしここはぐっと歯を食いしばって「1万再生もあれば22.8ドルくらいの収入は期待出来るだろう」と前向きに考えます。</p>



<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>



<h2>CloudFront、なんとか動きました</h2>



<p>　その後試行錯誤した結果、なんとかCloudFrontを動かすことが出来ました。</p>



<div class="hcb_wrap"><pre class="prism line-numbers lang-bash" data-lang="Bash"><code>$ curl -svo /dev/null https://cf.can.ne.jp/v/my-domain-in-2020s.mp
4
*   Trying 54.239.169.55:443...
* Connected to cf.can.ne.jp (54.239.169.55) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /opt/bitnami/common/openssl/certs/curl-ca-bundle.crt
*  CApath: none
...
&lt; HTTP/1.1 200 OK
&lt; Content-Type: video/mp4
&lt; Content-Length: 13960998
&lt; Connection: keep-alive
&lt; Server: nginx
&lt; Date: Mon, 12 Apr 2021 09:15:50 GMT
&lt; Last-Modified: Mon, 12 Apr 2021 08:33:00 GMT
&lt; ETag: &quot;607405bc-d50726&quot;
&lt; X-Frame-Options: SAMEORIGIN
&lt; X-Cache: Hit from cloudfront</code></pre></div>



<p class="has-white-background-color has-text-color has-background" style="color:#a30000"><strong>X-Cache: Hit from cloudfront</strong></p>



<p> 　次回以降、どのような設定を行ったかをゆっくり書いていきたいと思います。</p>
		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="いいねボタン"
					data-ulike-id="389"
					data-ulike-nonce="75398976d1"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_389"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="+1"></span>			</div></div>
	<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=%2F2021%2F04%2F12%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b3%25e3%2583%25b3%25e3%2583%2586%25e3%2583%25b3%25e3%2583%2584%25e9%2585%258d%25e4%25bf%25a1%25e3%2582%25b5%25e3%2583%25bc%25e3%2583%2593%25e3%2582%25b9cdn%25e3%2582%2592%25e4%25bd%259c%25e3%2582%258b%2F&amp;linkname=Cloudfront%2BLightSail%E3%81%A7%E3%82%B3%E3%83%B3%E3%83%86%E3%83%B3%E3%83%84%E9%85%8D%E4%BF%A1%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%28CDN%29%E3%82%92%E4%BD%9C%E3%82%8B" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_line" href="https://www.addtoany.com/add_to/line?linkurl=%2F2021%2F04%2F12%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b3%25e3%2583%25b3%25e3%2583%2586%25e3%2583%25b3%25e3%2583%2584%25e9%2585%258d%25e4%25bf%25a1%25e3%2582%25b5%25e3%2583%25bc%25e3%2583%2593%25e3%2582%25b9cdn%25e3%2582%2592%25e4%25bd%259c%25e3%2582%258b%2F&amp;linkname=Cloudfront%2BLightSail%E3%81%A7%E3%82%B3%E3%83%B3%E3%83%86%E3%83%B3%E3%83%84%E9%85%8D%E4%BF%A1%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%28CDN%29%E3%82%92%E4%BD%9C%E3%82%8B" title="Line" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=%2F2021%2F04%2F12%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b3%25e3%2583%25b3%25e3%2583%2586%25e3%2583%25b3%25e3%2583%2584%25e9%2585%258d%25e4%25bf%25a1%25e3%2582%25b5%25e3%2583%25bc%25e3%2583%2593%25e3%2582%25b9cdn%25e3%2582%2592%25e4%25bd%259c%25e3%2582%258b%2F&amp;linkname=Cloudfront%2BLightSail%E3%81%A7%E3%82%B3%E3%83%B3%E3%83%86%E3%83%B3%E3%83%84%E9%85%8D%E4%BF%A1%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%28CDN%29%E3%82%92%E4%BD%9C%E3%82%8B" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook_messenger" href="https://www.addtoany.com/add_to/facebook_messenger?linkurl=%2F2021%2F04%2F12%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b3%25e3%2583%25b3%25e3%2583%2586%25e3%2583%25b3%25e3%2583%2584%25e9%2585%258d%25e4%25bf%25a1%25e3%2582%25b5%25e3%2583%25bc%25e3%2583%2593%25e3%2582%25b9cdn%25e3%2582%2592%25e4%25bd%259c%25e3%2582%258b%2F&amp;linkname=Cloudfront%2BLightSail%E3%81%A7%E3%82%B3%E3%83%B3%E3%83%86%E3%83%B3%E3%83%84%E9%85%8D%E4%BF%A1%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%28CDN%29%E3%82%92%E4%BD%9C%E3%82%8B" title="Messenger" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=%2F2021%2F04%2F12%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b3%25e3%2583%25b3%25e3%2583%2586%25e3%2583%25b3%25e3%2583%2584%25e9%2585%258d%25e4%25bf%25a1%25e3%2582%25b5%25e3%2583%25bc%25e3%2583%2593%25e3%2582%25b9cdn%25e3%2582%2592%25e4%25bd%259c%25e3%2582%258b%2F&amp;linkname=Cloudfront%2BLightSail%E3%81%A7%E3%82%B3%E3%83%B3%E3%83%86%E3%83%B3%E3%83%84%E9%85%8D%E4%BF%A1%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%28CDN%29%E3%82%92%E4%BD%9C%E3%82%8B" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=%2F2021%2F04%2F12%2Fcloudfrontlightsail%25e3%2581%25a7%25e3%2582%25b3%25e3%2583%25b3%25e3%2583%2586%25e3%2583%25b3%25e3%2583%2584%25e9%2585%258d%25e4%25bf%25a1%25e3%2582%25b5%25e3%2583%25bc%25e3%2583%2593%25e3%2582%25b9cdn%25e3%2582%2592%25e4%25bd%259c%25e3%2582%258b%2F&#038;title=Cloudfront%2BLightSail%E3%81%A7%E3%82%B3%E3%83%B3%E3%83%86%E3%83%B3%E3%83%84%E9%85%8D%E4%BF%A1%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%28CDN%29%E3%82%92%E4%BD%9C%E3%82%8B" data-a2a-url="/2021/04/12/cloudfrontlightsail%e3%81%a7%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e9%85%8d%e4%bf%a1%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9cdn%e3%82%92%e4%bd%9c%e3%82%8b/" data-a2a-title="Cloudfront+LightSailでコンテンツ配信サービス(CDN)を作る"></a></p><p>The post <a href="/2021/04/12/cloudfrontlightsail%e3%81%a7%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e9%85%8d%e4%bf%a1%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9cdn%e3%82%92%e4%bd%9c%e3%82%8b/">Cloudfront+LightSailでコンテンツ配信サービス(CDN)を作る</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>/2021/04/12/cloudfrontlightsail%e3%81%a7%e3%82%b3%e3%83%b3%e3%83%86%e3%83%b3%e3%83%84%e9%85%8d%e4%bf%a1%e3%82%b5%e3%83%bc%e3%83%93%e3%82%b9cdn%e3%82%92%e4%bd%9c%e3%82%8b/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">389</post-id>	</item>
		<item>
		<title>WordPress Multisiteを選ぶべきか</title>
		<link>/2021/04/02/wordpress-multisite%e3%82%92%e9%81%b8%e3%81%b6%e3%81%b9%e3%81%8d%e3%81%8b/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-multisite%25e3%2582%2592%25e9%2581%25b8%25e3%2581%25b6%25e3%2581%25b9%25e3%2581%258d%25e3%2581%258b</link>
					<comments>/2021/04/02/wordpress-multisite%e3%82%92%e9%81%b8%e3%81%b6%e3%81%b9%e3%81%8d%e3%81%8b/#respond</comments>
		
		<dc:creator><![CDATA[masaru]]></dc:creator>
		<pubDate>Fri, 02 Apr 2021 10:28:27 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Webマーケティング]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Lightsail]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[サブドメイン]]></category>
		<guid isPermaLink="false">/?p=117</guid>

					<description><![CDATA[<p>　AWS LightsailのWordPressには通常版とマルチサイト版(WordPress Multisite)の二種類があります。どちらを選んでも致命的な影響はなさそうですが、複数のサブドメインでWordPress&#8230; <a class="more-link" href="/2021/04/02/wordpress-multisite%e3%82%92%e9%81%b8%e3%81%b6%e3%81%b9%e3%81%8d%e3%81%8b/">続きを読む <span class="screen-reader-text">WordPress Multisiteを選ぶべきか</span></a></p>
<p>The post <a href="/2021/04/02/wordpress-multisite%e3%82%92%e9%81%b8%e3%81%b6%e3%81%b9%e3%81%8d%e3%81%8b/">WordPress Multisiteを選ぶべきか</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>　AWS LightsailのWordPressには通常版とマルチサイト版(WordPress Multisite)の二種類があります。どちらを選んでも致命的な影響はなさそうですが、複数のサブドメインでWordPressを展開したいならMultisiteを選ぶ余地があります。</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="422" src="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/04/WordPress-vs-Multisite.png?resize=750%2C422&#038;ssl=1" alt="" class="wp-image-119" srcset="https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/04/WordPress-vs-Multisite.png?resize=1024%2C576&amp;ssl=1 1024w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/04/WordPress-vs-Multisite.png?resize=300%2C169&amp;ssl=1 300w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/04/WordPress-vs-Multisite.png?resize=768%2C432&amp;ssl=1 768w, https://i1.wp.com/can.ne.jp/wp-content/uploads/2021/04/WordPress-vs-Multisite.png?w=1280&amp;ssl=1 1280w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /></figure>



<p>　上図がWordPress Multisiteと一般的なWordPressの違いです。</p>



<p>　「①　一般的なWordPress」では複数のサブドメインを展開するために同数のLightSailインスタンスを作る必要があります。インスタンスごとにリソースを確保するので、リソースを使い切らない小規模のサイトでは割高になります。一方で、特定ドメイン用のインスタンスを停止しても他のサブドメインに影響が無いと言った利点もあります。</p>



<p>　「②　WordPress Multisite」では単一のLightSailインスタンス内で複数のサブドメインを展開出来ます。プラグインなど管理が一元化されるほか、LightSailインスタンスをひとつしか起動しないのでアクセス数が少ないうちは料金的にお得になります。ただし、一般的なWordPress用のプラグインが使えなくなる（有償契約が必要など）ことがあるため、初心者やサブドメインの展開予定が全くない場合は避けた方が良さそうです。</p>



<p>　また大規模なアクセスを期待出来るサイトの場合は、LightSailインスタンスのリソース制約があるのでWordPress Multisiteは避けた方が良いでしょう。「そもそもLightSailで大規模サイトを運用するのか？」という話もありますが<img src="https://s.w.org/images/core/emoji/13.1.0/72x72/1f4a6.png" alt="💦" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<h2>長期の仕事を探しています</h2>



<figure class="wp-block-image size-large"><img loading="lazy" width="750" height="422" src="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/job-request.jpg?resize=750%2C422&#038;ssl=1" alt="" class="wp-image-129" srcset="https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/job-request.jpg?resize=1024%2C576&amp;ssl=1 1024w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/job-request.jpg?resize=300%2C169&amp;ssl=1 300w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/job-request.jpg?resize=768%2C432&amp;ssl=1 768w, https://i2.wp.com/can.ne.jp/wp-content/uploads/2021/04/job-request.jpg?w=1280&amp;ssl=1 1280w" sizes="(max-width: 750px) 100vw, 750px" data-recalc-dims="1" /><figcaption>デジタルマーケティング関連の仕事を探しています❢</figcaption></figure>



<p class="has-yellow-background-color has-background">　今春から長期の仕事を探しています。40代なので「採用はちょっと……」という人事ご担当者様も多いと思います。正直20代の元気な方のような伸びしろはありませんが、当サイトでスキルレベルが適切と思われた方は、お気軽にお声がけ頂ければと思います。下記フォームかツイッター(<a href="https://twitter.com/masarumkt">https://twitter.com/masarumkt</a>)、あるいはメール(masapon05 アットマーク gmail.com)でご連絡下さい。</p>



<div class="wp-block-contact-form-7-contact-form-selector">[contact-form-7]</div>
		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="いいねボタン"
					data-ulike-id="117"
					data-ulike-nonce="ac946f6da0"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_117"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>
	<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=%2F2021%2F04%2F02%2Fwordpress-multisite%25e3%2582%2592%25e9%2581%25b8%25e3%2581%25b6%25e3%2581%25b9%25e3%2581%258d%25e3%2581%258b%2F&amp;linkname=WordPress%20Multisite%E3%82%92%E9%81%B8%E3%81%B6%E3%81%B9%E3%81%8D%E3%81%8B" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_line" href="https://www.addtoany.com/add_to/line?linkurl=%2F2021%2F04%2F02%2Fwordpress-multisite%25e3%2582%2592%25e9%2581%25b8%25e3%2581%25b6%25e3%2581%25b9%25e3%2581%258d%25e3%2581%258b%2F&amp;linkname=WordPress%20Multisite%E3%82%92%E9%81%B8%E3%81%B6%E3%81%B9%E3%81%8D%E3%81%8B" title="Line" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=%2F2021%2F04%2F02%2Fwordpress-multisite%25e3%2582%2592%25e9%2581%25b8%25e3%2581%25b6%25e3%2581%25b9%25e3%2581%258d%25e3%2581%258b%2F&amp;linkname=WordPress%20Multisite%E3%82%92%E9%81%B8%E3%81%B6%E3%81%B9%E3%81%8D%E3%81%8B" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook_messenger" href="https://www.addtoany.com/add_to/facebook_messenger?linkurl=%2F2021%2F04%2F02%2Fwordpress-multisite%25e3%2582%2592%25e9%2581%25b8%25e3%2581%25b6%25e3%2581%25b9%25e3%2581%258d%25e3%2581%258b%2F&amp;linkname=WordPress%20Multisite%E3%82%92%E9%81%B8%E3%81%B6%E3%81%B9%E3%81%8D%E3%81%8B" title="Messenger" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=%2F2021%2F04%2F02%2Fwordpress-multisite%25e3%2582%2592%25e9%2581%25b8%25e3%2581%25b6%25e3%2581%25b9%25e3%2581%258d%25e3%2581%258b%2F&amp;linkname=WordPress%20Multisite%E3%82%92%E9%81%B8%E3%81%B6%E3%81%B9%E3%81%8D%E3%81%8B" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=%2F2021%2F04%2F02%2Fwordpress-multisite%25e3%2582%2592%25e9%2581%25b8%25e3%2581%25b6%25e3%2581%25b9%25e3%2581%258d%25e3%2581%258b%2F&#038;title=WordPress%20Multisite%E3%82%92%E9%81%B8%E3%81%B6%E3%81%B9%E3%81%8D%E3%81%8B" data-a2a-url="/2021/04/02/wordpress-multisite%e3%82%92%e9%81%b8%e3%81%b6%e3%81%b9%e3%81%8d%e3%81%8b/" data-a2a-title="WordPress Multisiteを選ぶべきか"></a></p><p>The post <a href="/2021/04/02/wordpress-multisite%e3%82%92%e9%81%b8%e3%81%b6%e3%81%b9%e3%81%8d%e3%81%8b/">WordPress Multisiteを選ぶべきか</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>/2021/04/02/wordpress-multisite%e3%82%92%e9%81%b8%e3%81%b6%e3%81%b9%e3%81%8d%e3%81%8b/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">117</post-id>	</item>
		<item>
		<title>ようやく常時SSLになりました(Let&#8217;s Encrypt)</title>
		<link>/2021/04/01/%e3%82%88%e3%81%86%e3%82%84%e3%81%8f%e5%b8%b8%e6%99%82ssl%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9flets-encrypt/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=%25e3%2582%2588%25e3%2581%2586%25e3%2582%2584%25e3%2581%258f%25e5%25b8%25b8%25e6%2599%2582ssl%25e3%2581%25ab%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25be%25e3%2581%2597%25e3%2581%259flets-encrypt</link>
					<comments>/2021/04/01/%e3%82%88%e3%81%86%e3%82%84%e3%81%8f%e5%b8%b8%e6%99%82ssl%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9flets-encrypt/#respond</comments>
		
		<dc:creator><![CDATA[masaru]]></dc:creator>
		<pubDate>Thu, 01 Apr 2021 07:39:18 +0000</pubDate>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Bitnami]]></category>
		<category><![CDATA[Let&#039;s Encrypt]]></category>
		<category><![CDATA[Lightsail]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[WordPress]]></category>
		<guid isPermaLink="false">/?p=73</guid>

					<description><![CDATA[<p>　ウェブマーケ畑の人間なら1日も早く導入したいSSL。個人サイトということもあり、定番の無償SSLであるLet&#8217;s Encryptを導入しました。LightSail環境で立ち上げたWordPressなので一般&#8230; <a class="more-link" href="/2021/04/01/%e3%82%88%e3%81%86%e3%82%84%e3%81%8f%e5%b8%b8%e6%99%82ssl%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9flets-encrypt/">続きを読む <span class="screen-reader-text">ようやく常時SSLになりました(Let&#8217;s Encrypt)</span></a></p>
<p>The post <a href="/2021/04/01/%e3%82%88%e3%81%86%e3%82%84%e3%81%8f%e5%b8%b8%e6%99%82ssl%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9flets-encrypt/">ようやく常時SSLになりました(Let’s Encrypt)</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>　ウェブマーケ畑の人間なら1日も早く導入したいSSL。個人サイトということもあり、定番の無償SSLであるLet&#8217;s Encryptを導入しました。LightSail環境で立ち上げたWordPressなので一般的な環境と少し異なるので、メモしておきます。</p>



<p>Generate And Install A Let&#8217;s Encrypt SSL Certificate For A Bitnami Application</p>



<p>　<a rel="noreferrer noopener" href="https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/#step-5-renew-the-let-s-encrypt-certificate" target="_blank">https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/#step-5-renew-the-let-s-encrypt-certificate</a></p>



<p>bncert-toolというBitnami専用のツールをAWS Lightsailのコンソール上で行います。設定自体はとても簡単ですが、certbotの手順とは異なるので注意が必要です。</p>



<p>certbot instructions(一般的なdebian &#8211; apacheの場合はこちら)</p>



<p><a href="https://certbot.eff.org/">https://certbot.eff.org/</a></p>



<p>　ブログのようなオープンなサイトではSSLはセキュリティ面で必須とは思いませんが、Webブラウザで派手な警告が出ること、Google検索などで低評価を受けることを考えると個人サイトでも不可欠との認識です。</p>



<p>　技術畑ではない人にはどんどん敷居が高くなる独自ドメインでのサイト構築ですが、何とか時代の変化を追い続けてサイトを延命することには自身のスキル維持という意味でも重要と思います。</p>
		<div class="wpulike wpulike-default " ><div class="wp_ulike_general_class wp_ulike_is_not_liked"><button type="button"
					aria-label="いいねボタン"
					data-ulike-id="73"
					data-ulike-nonce="31bb01987e"
					data-ulike-type="post"
					data-ulike-template="wpulike-default"
					data-ulike-display-likers=""
					data-ulike-likers-style="popover"
					class="wp_ulike_btn wp_ulike_put_image wp_post_btn_73"></button><span class="count-box wp_ulike_counter_up" data-ulike-counter-value="0"></span>			</div></div>
	<p><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=%2F2021%2F04%2F01%2F%25e3%2582%2588%25e3%2581%2586%25e3%2582%2584%25e3%2581%258f%25e5%25b8%25b8%25e6%2599%2582ssl%25e3%2581%25ab%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25be%25e3%2581%2597%25e3%2581%259flets-encrypt%2F&amp;linkname=%E3%82%88%E3%81%86%E3%82%84%E3%81%8F%E5%B8%B8%E6%99%82SSL%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%28Let%E2%80%99s%20Encrypt%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_line" href="https://www.addtoany.com/add_to/line?linkurl=%2F2021%2F04%2F01%2F%25e3%2582%2588%25e3%2581%2586%25e3%2582%2584%25e3%2581%258f%25e5%25b8%25b8%25e6%2599%2582ssl%25e3%2581%25ab%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25be%25e3%2581%2597%25e3%2581%259flets-encrypt%2F&amp;linkname=%E3%82%88%E3%81%86%E3%82%84%E3%81%8F%E5%B8%B8%E6%99%82SSL%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%28Let%E2%80%99s%20Encrypt%29" title="Line" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=%2F2021%2F04%2F01%2F%25e3%2582%2588%25e3%2581%2586%25e3%2582%2584%25e3%2581%258f%25e5%25b8%25b8%25e6%2599%2582ssl%25e3%2581%25ab%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25be%25e3%2581%2597%25e3%2581%259flets-encrypt%2F&amp;linkname=%E3%82%88%E3%81%86%E3%82%84%E3%81%8F%E5%B8%B8%E6%99%82SSL%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%28Let%E2%80%99s%20Encrypt%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook_messenger" href="https://www.addtoany.com/add_to/facebook_messenger?linkurl=%2F2021%2F04%2F01%2F%25e3%2582%2588%25e3%2581%2586%25e3%2582%2584%25e3%2581%258f%25e5%25b8%25b8%25e6%2599%2582ssl%25e3%2581%25ab%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25be%25e3%2581%2597%25e3%2581%259flets-encrypt%2F&amp;linkname=%E3%82%88%E3%81%86%E3%82%84%E3%81%8F%E5%B8%B8%E6%99%82SSL%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%28Let%E2%80%99s%20Encrypt%29" title="Messenger" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_copy_link" href="https://www.addtoany.com/add_to/copy_link?linkurl=%2F2021%2F04%2F01%2F%25e3%2582%2588%25e3%2581%2586%25e3%2582%2584%25e3%2581%258f%25e5%25b8%25b8%25e6%2599%2582ssl%25e3%2581%25ab%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25be%25e3%2581%2597%25e3%2581%259flets-encrypt%2F&amp;linkname=%E3%82%88%E3%81%86%E3%82%84%E3%81%8F%E5%B8%B8%E6%99%82SSL%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%28Let%E2%80%99s%20Encrypt%29" title="Copy Link" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=%2F2021%2F04%2F01%2F%25e3%2582%2588%25e3%2581%2586%25e3%2582%2584%25e3%2581%258f%25e5%25b8%25b8%25e6%2599%2582ssl%25e3%2581%25ab%25e3%2581%25aa%25e3%2582%258a%25e3%2581%25be%25e3%2581%2597%25e3%2581%259flets-encrypt%2F&#038;title=%E3%82%88%E3%81%86%E3%82%84%E3%81%8F%E5%B8%B8%E6%99%82SSL%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%28Let%E2%80%99s%20Encrypt%29" data-a2a-url="/2021/04/01/%e3%82%88%e3%81%86%e3%82%84%e3%81%8f%e5%b8%b8%e6%99%82ssl%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9flets-encrypt/" data-a2a-title="ようやく常時SSLになりました(Let’s Encrypt)"></a></p><p>The post <a href="/2021/04/01/%e3%82%88%e3%81%86%e3%82%84%e3%81%8f%e5%b8%b8%e6%99%82ssl%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9flets-encrypt/">ようやく常時SSLになりました(Let’s Encrypt)</a> first appeared on <a href="/">MasaruのIT＆マーケティングBLOG  |  Info Tech & Marketing BLOG by Masaru</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>/2021/04/01/%e3%82%88%e3%81%86%e3%82%84%e3%81%8f%e5%b8%b8%e6%99%82ssl%e3%81%ab%e3%81%aa%e3%82%8a%e3%81%be%e3%81%97%e3%81%9flets-encrypt/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">73</post-id>	</item>
	</channel>
</rss>
