Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
WebサーバとAPサーバの違い
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yosi
August 08, 2022
Programming
330
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
WebサーバとAPサーバの違い
yosi
August 08, 2022
Transcript
23 slides
ココカラ勉強会 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
三層構造のメリット ・責務の分担で処理を軽減で きる。 ・バグがあった場合に、その サーバのみのデバッグです む。 ・拡張性があり、柔軟に対応 できる。 デメリット ・費用がサーバー台分高い。
御清聴ありがとうございました!
More Decks by yosi
See All by yosi
自社開発のエンジニアの私が 大事にしてること(n=1)
yoshisan
1
120
なるほどGit講座 (追跡ブランチが理解できます!)
yoshisan
0
220
「自分の時間を生きる」キャリア論
yoshisan
1
130
小学生でもわかる SlackAPI×GAS
yoshisan
0
130
達人プログラマーになろう!
yoshisan
0
140
認証認可
yoshisan
1
170
オブジェクト指向が"チョットワカル"スライド
yoshisan
0
150
Linuxについて"ほんのチョットワカル"スライド
yoshisan
1
150
Let's React!! "チョットワカル"の第一歩
yoshisan
1
240
Other Decks in Programming
See All in Programming
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
1k
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
140
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
260
SODA - FACT BOOK(EN)
sodainc
1
260
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
440
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
340
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
590
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
350
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.1k
あなたはMCPの機能を、まだ知らない。
4geru
1
640
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
170
Featured
See All Featured
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
470
Utilizing Notion as your number one productivity tool
mfonobong
4
650
Navigating Team Friction
lara
192
16k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Building an army of robots
kneath
307
47k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
580
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Unsuck your backbone
ammeep
672
58k
GraphQLとの向き合い方2022年版
quramy
50
15k