2. User
Browser
DNS
Server
(1)
DNS
Lookup
(http://codefellows.org)
(2)
IP
Address
Web
Server
(for
example
Apache)
(3)
HTTP
Request
[URI]
(http://codefellows.org)
[method]
(GET)
[request
header]
(user
agent,
etc.)
Application
Server
(for
example
Phusion
Passenger)
(4)
Recognized
Ruby
application
request
–
forward
to
app
server
H
I
G
H
L
E
V
E
L
3. Ruby
Version
Manager
Gemfile
Rails
Routes
(5)
Go
to
RVM
(6)
Check
Rails
version
in
Gemfile
(7)
Check
routes
using
HTTP
request
URI
and
method
M
I
D
L
E
V
E
L
4. L
O
W
L
E
V
E
L
Controller
Model
View
(9)
Go
to
Model,
get
data
from
database
(8)
Go
to
appropriate
controller
(index)
Controller
(10)
Return
to
controller
(11)
Compile
response
body
(HTML)
5. Application
Server
(for
example
Phusion
Passenger)
H
I
G
H
L
E
V
E
L
Web
Server
(for
example
Apache)
User
Browser
(14)
Render
view
(12)
Send
HTTP
Response
to
app
server
[Status
code]
(200)
[Response
header]
(cookie,
etc.)
[Response
body]
(HTML,
CSS,
Javascript)
(13)
Forward
HTTP
Response
Repeat
for
linked
files
(CSS,
images,
etc.)