Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WebサーバとAPサーバの違い
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
yosi
August 08, 2022
Programming
300
1
Share
WebサーバとAPサーバの違い
yosi
August 08, 2022
More Decks by yosi
See All by yosi
自社開発のエンジニアの私が 大事にしてること(n=1)
yoshisan
1
89
なるほどGit講座 (追跡ブランチが理解できます!)
yoshisan
0
200
「自分の時間を生きる」キャリア論
yoshisan
1
110
小学生でもわかる SlackAPI×GAS
yoshisan
0
120
達人プログラマーになろう!
yoshisan
0
130
認証認可
yoshisan
1
150
オブジェクト指向が"チョットワカル"スライド
yoshisan
0
130
Linuxについて"ほんのチョットワカル"スライド
yoshisan
1
130
Let's React!! "チョットワカル"の第一歩
yoshisan
1
220
Other Decks in Programming
See All in Programming
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
Explore CoroutineScope
tomoeng11
0
180
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
390
Are We Really Coding 10× Faster with AI?
kohzas
0
140
AI時代になぜ書くのか
mutsumix
0
340
継続的な負荷検証を目指して
pyama86
3
1k
リセットCSSを1行消したらアクセシビリティが向上した話
pvcresin
4
500
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1k
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
340
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
680
Symfony AI in Action - SymfonyLive Berlin 2026
chr_hertel
1
140
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
110
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Prompt Engineering for Job Search
mfonobong
0
300
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
170
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
180
Evolving SEO for Evolving Search Engines
ryanjones
0
190
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
200
First, design no harm
axbom
PRO
2
1.2k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
510
[SF Ruby Conf 2025] Rails X
palkan
2
1k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
180
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Transcript
ココカラ勉強会 WEBサーバ と APサーバの違い 発表者 よし
主な内容 Webの仕組み 大まかな枠組み Webの三層構造について Webサーバとは APサーバとは まとめ 本日の流れ
今まで話した LT内容 ・WWWの歴史 ・HTTP、TCP/IPについて ・Linuxについて ・ブラウザについて(Webレンダリング) ・,,,,etc
「WebサーバとAPサーバ ってよく聞くけど、何が 違うんでしょ??」 最近この質問に詰まってしまいま した。
AP サーバ プログラムが処理を行い 動的コンテンツをつく る。 WEB サーバ クライアントから来たリ クエストをAPサーバに渡 したり、静的コンテンツ
を送る。
アプリケーション ミドルウェア ハードウェア OS
役割 ①静的コンテンツを送る ②動的コンテンツをつくる ようにAPサーバにリクエス トし、作られたHTMLをク ライアントに返す Apache HTTP Server ・OSS
・マルチプロセスの プロセス駆動アーキテクチャ →C10K問題 Webサーバ 主なWebサーバ NGINX ・OSS ・シングルスレッドモデルの イベント駆動アーキテクチャ 特徴 多くのリクエストが来る が、一つに対する処理の不 可は軽い
役割 ①Webサーバのリクエストをもとに、 JavaやPHP等で作られたAppで動的コン テンツの作成 ②必要があればDBサーバへアクセスし データのCRUDを行い、加工したHTML をWebサーバに返す。 APサーバ 主なWebサーバ Tomcat
from Java Puma /unicorn from ruby gunicorn from Python php_mod php (モジュール) 特徴 リクエストの数は少ないが、一つに対す る処理が重い
WEBのしくみ まずは簡単に
クライアント サーバ クライアントサーバーシステム リクエスト レスポンス サイト見たい! データ送るね!
クライアント サーバ クライアントサーバーシステム 今回はこの サーバにつ いてもっと 深掘りまし ょう! サイト見たい! データ送るね!
クライアント サーバ クライアントサーバーシステム リクエスト レスポンス サイト見たい! HTML送るね! サーバの歴史 ①静的サイトのみを返していた。
同じ情報がかえってくるだけ じゃなくて、動的な機能をつ けたいなぁ。
動的 コンテンツ 見る人や、時間によって 変化するコンテンツ 例 ECサイト SNSサービス 静的 コンテンツ いつ見ても変わらない、
同じコンテンツ 例 ホームページ ブログ
クライアント Webサーバ サイト見たい! 動的アプリケーションの誕生 サーバの歴史 ②CGIの登場! 新しいHTML作るね! Webサーバ内 Perl インタプリンタ CommonGatewayInterface
(異なる機器感で通信が可能に) アプリケーション ノード1
CGIめっちゃ遅いし、Perl大 規模むいてないな,,, もっと柔軟にかつ、高速にで きひんかな〜
クライアント Apache (Webサーバ) プログラム サイト見たい! Javaでより高速、大規模化! サーバの歴史 ③モジュールで高速化! mod_jk ajp13 プロトコル
Tomcat (APサーバ) ノード
クライアント Apache (Webサーバ) サイト見たい! WEB三層構造の完成! サーバの歴史 ④それぞれサーバを分けて拡大! mod_jk Tomcat (APサーバ) MySQL
(DBサーバ) ノード1 ノード3 ノード2
WEBサーバ DBサーバ APサーバ WEBの3層構造
クライアント Apache (Webサーバ) ケースによって変化可能! APサーバを分けて処理を分散 mod_jk Tomcat1 (APサーバ) Bの処理Tomcat2へ Tomcat2
(APサーバ) Aの処理はTomcat1へ
クライアント サイト見たい! 小規模ならこれもOK! Web/APサーバの構成も可能! Tomcat (Web/APサーバ) MySQL (DBサーバ) ノード2 ノード1
三層構造のメリット ・責務の分担で処理を軽減で きる。 ・バグがあった場合に、その サーバのみのデバッグです む。 ・拡張性があり、柔軟に対応 できる。 デメリット ・費用がサーバー台分高い。
御清聴ありがとうございました!