Download - Apache 3.0 (a tall tale)
Apach
eCon
Leading the Waveof Open Source
Apache 3.0 (a tall tale)
Roy T. Fielding, Ph.D.Chief Scientist, Day Software
Cofounder, The Apache Software Foundation
Vice President, Apache HTTP Server
http://roy.gbiv.com/talks/200804_Apache3_ApacheCon.pdf
wak
a
© 2008 Roy T. Fielding
Apache 3.0
Roy T. Fielding, Ph.DChief Scientist, Day Software
Cofounder, The Apache Software Foundation
Vice President, Apache HTTP Server
2
wak
a
© 2008 Roy T. Fielding
Apache 3.0
Roy T. Fielding, Ph.DChief Scientist, Day Software
Cofounder, The Apache Software Foundation
Vice President, Apache HTTP Server
2
NOT
APPROVED
CONSENSUS
© 2008 Roy T. Fielding Apache 3.0
Outline
a bit of history
what does a web server do
introducing Apache 3.0
the nature of collaboration
3
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
0.8.0
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
0.8.0
1.1b1
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
0.8.0
1.1b1
1.2b0
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
0.8.0
1.1b1
1.2b0
1.2.0
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
0.8.0
1.1b1
1.2b0
1.2.0
1.2.5
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
0.8.0
1.1b1
1.2b0
1.2.0
1.2.5
1.3.0
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
0.8.0
1.1b1
1.2b0
1.2.0
1.2.5
1.3.0
1.3.4
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
0.8.0
1.1b1
1.2b0
1.2.0
1.2.5
1.3.0
1.3.4
1.3.9
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
4
0
500
1000
1500
2000
2500
3000
1995
0319
9504
1995
0519
9506
1995
0719
9508
1995
0919
9510
1995
1119
9512
1996
0119
9602
1996
0319
9604
1996
0519
9606
1996
0719
9608
1996
0919
9610
1996
1119
9612
1997
0119
9702
1997
0319
9704
1997
0519
9706
1997
0719
9708
1997
0919
9710
1997
1119
9712
1998
0119
9802
1998
0319
9804
1998
0519
9806
1998
0719
9808
1998
0919
9810
1998
1119
9812
1999
0119
9902
1999
0319
9904
1999
0519
9906
1999
0719
9908
1999
0919
9910
1999
1119
9912
2000
0120
0002
2000
03
First Five Years
httpd-dev httpd-priv apr-dev apr-priv
0.6.2
0.8.0
1.1b1
1.2b0
1.2.0
1.2.5
1.3.0
1.3.4
1.3.9
2.0a1
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
5
0
500
1000
1500
2000
2500
3000
2000
03
2000
05
2000
07
2000
09
2000
11
2001
01
2001
03
2001
05
2001
07
2001
09
2001
11
2002
01
2002
03
2002
05
2002
07
2002
09
2002
11
2003
01
2003
03
2003
05
2003
07
2003
09
2003
11
2004
01
2004
03
2004
05
2004
07
2004
09
2004
11
2005
01
2005
03
2005
05
2005
07
2005
09
2005
11
2006
01
2006
03
2006
05
2006
07
2006
09
2006
11
2007
01
2007
03
2007
05
2007
07
2007
09
2007
11
2008
01
2008
03
Last Eight Years
httpd-dev httpd-priv apr-dev apr-priv
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
5
0
500
1000
1500
2000
2500
3000
2000
03
2000
05
2000
07
2000
09
2000
11
2001
01
2001
03
2001
05
2001
07
2001
09
2001
11
2002
01
2002
03
2002
05
2002
07
2002
09
2002
11
2003
01
2003
03
2003
05
2003
07
2003
09
2003
11
2004
01
2004
03
2004
05
2004
07
2004
09
2004
11
2005
01
2005
03
2005
05
2005
07
2005
09
2005
11
2006
01
2006
03
2006
05
2006
07
2006
09
2006
11
2007
01
2007
03
2007
05
2007
07
2007
09
2007
11
2008
01
2008
03
Last Eight Years
httpd-dev httpd-priv apr-dev apr-priv
2.0a1
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
5
0
500
1000
1500
2000
2500
3000
2000
03
2000
05
2000
07
2000
09
2000
11
2001
01
2001
03
2001
05
2001
07
2001
09
2001
11
2002
01
2002
03
2002
05
2002
07
2002
09
2002
11
2003
01
2003
03
2003
05
2003
07
2003
09
2003
11
2004
01
2004
03
2004
05
2004
07
2004
09
2004
11
2005
01
2005
03
2005
05
2005
07
2005
09
2005
11
2006
01
2006
03
2006
05
2006
07
2006
09
2006
11
2007
01
2007
03
2007
05
2007
07
2007
09
2007
11
2008
01
2008
03
Last Eight Years
httpd-dev httpd-priv apr-dev apr-priv
2.0a1
1.3.14
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
5
0
500
1000
1500
2000
2500
3000
2000
03
2000
05
2000
07
2000
09
2000
11
2001
01
2001
03
2001
05
2001
07
2001
09
2001
11
2002
01
2002
03
2002
05
2002
07
2002
09
2002
11
2003
01
2003
03
2003
05
2003
07
2003
09
2003
11
2004
01
2004
03
2004
05
2004
07
2004
09
2004
11
2005
01
2005
03
2005
05
2005
07
2005
09
2005
11
2006
01
2006
03
2006
05
2006
07
2006
09
2006
11
2007
01
2007
03
2007
05
2007
07
2007
09
2007
11
2008
01
2008
03
Last Eight Years
httpd-dev httpd-priv apr-dev apr-priv
2.0a1
1.3.142.0.14
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
5
0
500
1000
1500
2000
2500
3000
2000
03
2000
05
2000
07
2000
09
2000
11
2001
01
2001
03
2001
05
2001
07
2001
09
2001
11
2002
01
2002
03
2002
05
2002
07
2002
09
2002
11
2003
01
2003
03
2003
05
2003
07
2003
09
2003
11
2004
01
2004
03
2004
05
2004
07
2004
09
2004
11
2005
01
2005
03
2005
05
2005
07
2005
09
2005
11
2006
01
2006
03
2006
05
2006
07
2006
09
2006
11
2007
01
2007
03
2007
05
2007
07
2007
09
2007
11
2008
01
2008
03
Last Eight Years
httpd-dev httpd-priv apr-dev apr-priv
2.0a1
1.3.142.0.14
2.0.35
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
5
0
500
1000
1500
2000
2500
3000
2000
03
2000
05
2000
07
2000
09
2000
11
2001
01
2001
03
2001
05
2001
07
2001
09
2001
11
2002
01
2002
03
2002
05
2002
07
2002
09
2002
11
2003
01
2003
03
2003
05
2003
07
2003
09
2003
11
2004
01
2004
03
2004
05
2004
07
2004
09
2004
11
2005
01
2005
03
2005
05
2005
07
2005
09
2005
11
2006
01
2006
03
2006
05
2006
07
2006
09
2006
11
2007
01
2007
03
2007
05
2007
07
2007
09
2007
11
2008
01
2008
03
Last Eight Years
httpd-dev httpd-priv apr-dev apr-priv
2.0a1
1.3.142.0.14
2.0.35
2.0.49
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
5
0
500
1000
1500
2000
2500
3000
2000
03
2000
05
2000
07
2000
09
2000
11
2001
01
2001
03
2001
05
2001
07
2001
09
2001
11
2002
01
2002
03
2002
05
2002
07
2002
09
2002
11
2003
01
2003
03
2003
05
2003
07
2003
09
2003
11
2004
01
2004
03
2004
05
2004
07
2004
09
2004
11
2005
01
2005
03
2005
05
2005
07
2005
09
2005
11
2006
01
2006
03
2006
05
2006
07
2006
09
2006
11
2007
01
2007
03
2007
05
2007
07
2007
09
2007
11
2008
01
2008
03
Last Eight Years
httpd-dev httpd-priv apr-dev apr-priv
2.0a1
1.3.142.0.14
2.0.35
2.1.6
2.0.49
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
5
0
500
1000
1500
2000
2500
3000
2000
03
2000
05
2000
07
2000
09
2000
11
2001
01
2001
03
2001
05
2001
07
2001
09
2001
11
2002
01
2002
03
2002
05
2002
07
2002
09
2002
11
2003
01
2003
03
2003
05
2003
07
2003
09
2003
11
2004
01
2004
03
2004
05
2004
07
2004
09
2004
11
2005
01
2005
03
2005
05
2005
07
2005
09
2005
11
2006
01
2006
03
2006
05
2006
07
2006
09
2006
11
2007
01
2007
03
2007
05
2007
07
2007
09
2007
11
2008
01
2008
03
Last Eight Years
httpd-dev httpd-priv apr-dev apr-priv
2.0a1
1.3.142.0.14
2.2.0
2.0.35
2.1.6
2.0.49
© 2008 Roy T. Fielding Apache 3.0
HTTP Server Project
5
0
500
1000
1500
2000
2500
3000
2000
03
2000
05
2000
07
2000
09
2000
11
2001
01
2001
03
2001
05
2001
07
2001
09
2001
11
2002
01
2002
03
2002
05
2002
07
2002
09
2002
11
2003
01
2003
03
2003
05
2003
07
2003
09
2003
11
2004
01
2004
03
2004
05
2004
07
2004
09
2004
11
2005
01
2005
03
2005
05
2005
07
2005
09
2005
11
2006
01
2006
03
2006
05
2006
07
2006
09
2006
11
2007
01
2007
03
2007
05
2007
07
2007
09
2007
11
2008
01
2008
03
Last Eight Years
httpd-dev httpd-priv apr-dev apr-priv
2.0a1
1.3.142.0.14
2.2.0
2.0.35
2.1.6
2.0.49all
© 2008 Roy T. Fielding Apache 3.0
Summary
6
Collaboration is best when people have work to do
When activity is low, people don’t look for work
When activity is high, people look to help out
Creating activity is NOT a group decision!
Infrequent releases cause lower expectationsand our expectations are at the lowest point in our history!
© 2008 Roy T. Fielding Apache 3.0
Outline
a bit of history
what does a web server do
introducing Apache 3.0
the nature of collaboration
7
© 2008 Roy T. Fielding Apache 3.0
Role of an HTTP Server
8
[Ralf S. Engelschall, 2000]
© 2008 Roy T. Fielding Apache 3.0
things a web server doesread configuration
listen for connections
parse requests
map URI and method toredirects and aliases
cache
access control, authenticate, authorize
handler
determine response
send response9
© 2008 Roy T. Fielding Apache 3.0
Role of an Apache 1.0
10
Origin ServerDynamic Content
Centralized DataFS, RDBMS
Browsers/Spiders
© 2008 Roy T. Fielding Apache 3.0
Role of an Apache 1.1
11
Origin ServerDynamic Content
Centralized DataFS, RDBMS
Browsers/Spiders
ProxyProxy Cache
© 2008 Roy T. Fielding Apache 3.0
Role of an Apache 2.0
12
Origin ServerDynamic Content
Centralized DataFS, RDBMS
Gateways/ProxyReverseAccelerator Cache
Browsers/Spiders
ProxyProxy Cache
POP3, ECHO
© 2008 Roy T. Fielding Apache 3.0
Role of an Apache 2.2
13
Origin ServersDynamic Content
Centralized DataFS, RDBMS, JCR
Gateways/ProxyReverseAccelerator Cache
Browsers/Spiders
ProxyProxy Cache
POP3, ECHOFTP, SMTP
© 2008 Roy T. Fielding Apache 3.0
Apache httpd 2.x Filters
14
Resource /Content Set
Protocol /Transcode
Network / Connection
CORE_IN SSL_IN HTTP_INSocket DEFLATE
Client
CORE SSL_OUT HTTPHEADER DEFLATE
Server
Requestprocessing
req req req req
Socket
Input Filters
Output Filters
reqreqreq req
Filter A Filter B
Brigade Brigade ...
Filter X...
BrigadeBucket Bucket Bucket Bucket
Brigade
Bucket
[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/]
© 2008 Roy T. Fielding Apache 3.0
Summary
15
Apache httpd does a lot more now than in 1.0
Yet the internal architecture is basically the same
In other words,our architecture was not designed for this stuff(i.e., it is only adequately supported, not ideally)
much of it has been slapped together in odd waysto avoid incompatible changes and configuration
much of it isn’t used
some of it shouldn’t be used
and it is interfering with our ability to HAVE FUN
© 2008 Roy T. Fielding Apache 3.0
Outline
a bit of history
what does a web server do
introducing Apache 3.0
the nature of collaboration
16
© 2008 Roy T. Fielding Apache 3.0
It’s time for Apache 3.0
17
© 2008 Roy T. Fielding Apache 3.0
It’s time for Apache 3.0One process model per common platform
no more guessing who is running how on what
no more support for platforms that suck (use 1.3.x)
if you want to run on/with something else,you’ve got the source code
17
© 2008 Roy T. Fielding Apache 3.0
It’s time for Apache 3.0One process model per common platform
no more guessing who is running how on what
no more support for platforms that suck (use 1.3.x)
if you want to run on/with something else,you’ve got the source code
All compile-time choices are GONEhttpd and httpsd are DIFFERENT executables
APR is replaced by Moccasin
17
© 2008 Roy T. Fielding Apache 3.0
It’s time for Apache 3.0One process model per common platform
no more guessing who is running how on what
no more support for platforms that suck (use 1.3.x)
if you want to run on/with something else,you’ve got the source code
All compile-time choices are GONEhttpd and httpsd are DIFFERENT executables
APR is replaced by Moccasin
All APIs are based on Wakaget those sticky hands off my data structures!
17
© 2008 Roy T. Fielding Apache 3.0
It’s time for Apache 3.0One process model per common platform
no more guessing who is running how on what
no more support for platforms that suck (use 1.3.x)
if you want to run on/with something else,you’ve got the source code
All compile-time choices are GONEhttpd and httpsd are DIFFERENT executables
APR is replaced by Moccasin
All APIs are based on Wakaget those sticky hands off my data structures!
“Kiss my ass” compatibility
17
© 2008 Roy T. Fielding Apache 3.0
Simplify Process Model
18
© 2008 Roy T. Fielding Apache 3.0
Simplify Process ModelModular Process Models
Apache 0.3fork model
Apache 1.0prefork model
Apache 1.3 introduced non-Unix modelsprefork, win32
Apache 2.x introduced MPMsprefork, beos, mpmt, os2, netware, threaded, winnt, worker, event
18
© 2008 Roy T. Fielding Apache 3.0
Simplify Process ModelModular Process Models
Apache 0.3fork model
Apache 1.0prefork model
Apache 1.3 introduced non-Unix modelsprefork, win32
Apache 2.x introduced MPMsprefork, beos, mpmt, os2, netware, threaded, winnt, worker, event
Apache 3.0 will just use the right MPMbased on whatever our own developers have tested to bethe best choice for a given platform
We call this the “spooning model”
18
© 2008 Roy T. Fielding Apache 3.0
Spooning Model
19
master clean-up
clean-up
master / restart initialization
First-timeinitialization
Init Memory
detach process
readconfiguration
proclaim new generation,read configuration
init scoreboard
startup child servers ®ister in scoreboard
wait for child'sdeath or time-out
adjust number ofidle child server
kill idle childserver
kill all childserver
child serverinitialization
killedor new
generation
graceful restart
shutdown or restart graceful restart
shutdown
free resources child serverclean-up
Master Server Child Servers
restartloop
masterserver loop
request-response loop
create child serverprocesses
wait for request
process requestupdate scoreboard
wait for connectionrequest
close connectionupdate scoreboard
timeout
keep-alive loop
[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/]
© 2008 Roy T. Fielding Apache 3.0
Spooning Model
19
master clean-up
clean-up
master / restart initialization
First-timeinitialization
Init Memory
detach process
readconfiguration
proclaim new generation,read configuration
init scoreboard
startup child servers ®ister in scoreboard
wait for child'sdeath or time-out
adjust number ofidle child server
kill idle childserver
kill all childserver
child serverinitialization
killedor new
generation
graceful restart
shutdown or restart graceful restart
shutdown
free resources child serverclean-up
Master Server Child Servers
restartloop
masterserver loop
request-response loop
create child serverprocesses
wait for request
process requestupdate scoreboard
wait for connectionrequest
close connectionupdate scoreboard
timeout
keep-alive loop
[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/]
Too much Child Labor!
© 2008 Roy T. Fielding Apache 3.0
Spooning Model
19
master clean-up
clean-up
master / restart initialization
First-timeinitialization
Init Memory
detach process
readconfiguration
proclaim new generation,read configuration
init scoreboard
startup child servers ®ister in scoreboard
wait for child'sdeath or time-out
adjust number ofidle child server
kill idle childserver
kill all childserver
child serverinitialization
killedor new
generation
graceful restart
shutdown or restart graceful restart
shutdown
free resources child serverclean-up
Master Server Child Servers
restartloop
masterserver loop
request-response loop
create child serverprocesses
wait for request
process requestupdate scoreboard
wait for connectionrequest
close connectionupdate scoreboard
timeout
keep-alive loop
[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/]
Too much Child Labor!
© 2008 Roy T. Fielding Apache 3.0
Spooning Model
19
master clean-up
clean-up
master / restart initialization
First-timeinitialization
Init Memory
detach process
readconfiguration
proclaim new generation,read configuration
init scoreboard
startup child servers ®ister in scoreboard
wait for child'sdeath or time-out
adjust number ofidle child server
kill idle childserver
kill all childserver
child serverinitialization
killedor new
generation
graceful restart
shutdown or restart graceful restart
shutdown
free resources child serverclean-up
Master Server Child Servers
restartloop
masterserver loop
request-response loop
create child serverprocesses
wait for request
process requestupdate scoreboard
wait for connectionrequest
close connectionupdate scoreboard
timeout
keep-alive loop
[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/]
Too much Child Labor!
adult serfs
© 2008 Roy T. Fielding Apache 3.0
Less Configuration
Default to SAFE and SIMPLE configurationno (default) configuration files
no compile-time settings
All settings designed for PROGRAMMER TESTINGstart up using current owner and group
listen to localhost:8080
default to content/manual
all other settings must be on command-linehttpd -c configuration.txthttpsd -C directory
20
© 2008 Roy T. Fielding Apache 3.0 21
Waka
A new protocol designed to match the efficiency of well-designed Web Applications
Why “waka”?Mäori word (pronounced “wah-kah”) for the outrigger canoes used to travel safely on the Pacific Ocean, across hundreds of islands, to Aotearoa (New Zealand)
Also, one of the few four-letter words suitable for a protocol name
Deployable within an HTTP connectionvia the HTTP/1.1 Upgrade header field
defined mapping to HTTP/1.1 for proxies
© 2008 Roy T. Fielding Apache 3.0
HTTP Syntax
22
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
© 2008 Roy T. Fielding Apache 3.0
HTTP Syntax
22
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
typical headers 325-400B +
cookies =1079 Bytes
© 2008 Roy T. Fielding Apache 3.0
HTTP Syntax
22
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
typical headers 325-400B +
cookies =1079 Bytes
typical headers 300-400B + set-cookies =3487 Bytes
© 2008 Roy T. Fielding Apache 3.0
HTTP not self-descriptive
23
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
© 2008 Roy T. Fielding Apache 3.0
HTTP not self-descriptive
23
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
Control Data
© 2008 Roy T. Fielding Apache 3.0
HTTP not self-descriptive
23
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
Control Data
Message Metadata
© 2008 Roy T. Fielding Apache 3.0
HTTP not self-descriptive
23
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
Control Data
Message Metadata
RepresentationMetadata
© 2008 Roy T. Fielding Apache 3.0
HTTP not self-descriptive
23
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
Control Data
Message Metadata
RepresentationMetadata
ResourceMetadata
© 2008 Roy T. Fielding Apache 3.0
HTTP not self-descriptive
23
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
Control Data
Message Metadata
RepresentationMetadata
ResourceMetadataData
© 2008 Roy T. Fielding Apache 3.0
HTTP not self-descriptive
23
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
Control Data
Message Metadata
RepresentationMetadata
ResourceMetadataData
Extensions cannot indicate scope or mandate
© 2008 Roy T. Fielding Apache 3.0
HTTP not self-descriptive
23
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
Control Data
Message Metadata
RepresentationMetadata
ResourceMetadataData
Extensions cannot indicate scope or mandate
Messages associated by order sent/received
© 2008 Roy T. Fielding Apache 3.0
HTTP Syntax Wasted
24
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
© 2008 Roy T. Fielding Apache 3.0
HTTP Syntax Wasted
24
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
content negotiation is a
waste of bits
© 2008 Roy T. Fielding Apache 3.0
HTTP Syntax Wasted
24
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
content negotiation is a
waste of bits
Dates need 8 bytes max
Useless product advertising
Header names need 1-2 bytes
© 2008 Roy T. Fielding Apache 3.0
HTTP Syntax Wasted
24
GET /Test/hello.html HTTP/1.1\r\nHost: kiwi.ics.uci.edu:8080\r\nAccept: text/html, text/*, */*\r\nUser-Agent: GET/7 libwww-perl/5.40\r\n\r\n
HTTP/1.1 200 OK\r\nDate: Thu, 09 Mar 2000 15:40:09 GMT\r\nServer: Apache/1.3.12\r\nContent-Type: text/html\r\nContent-Language: en\r\nTransfer-Encoding: chunked\r\nEtag: “a797cd-465af”\r\nCache-control: max-age=3600\r\nVary: Accept-Language\r\n\r\n 4090\r\n<HTML><HEAD> …
content negotiation is a
waste of bits
Dates need 8 bytes max
Useless product advertising
Header names need 1-2 bytes
Mostly impacts low-powerand bandwidth-limited devices
© 2008 Roy T. Fielding Apache 3.0
HTTP/2.x Syntax ?
25
G http://kiwi.ics.uci.edu:8080/Test/hello.html HTTP20\r\n\r\n
HTTP20 200\r\nDT:47FC71DD\r\nCT:t/html\r\nCL:en\r\nTE:c\r\nET:“a797cd-465af”\r\nCC:ma=3600\r\nVY:AL\r\n\r\n 4090\r\n<HTML><HEAD> …
© 2008 Roy T. Fielding Apache 3.0
Waka Syntax
26
waka22\r\nQAG100#http://kiwi.ics.uci.edu:8080/Test/hello.htmlSSakaw\r\n
waka22\r\nRAG120#http://kiwi.ics.uci.edu:8080/Test/hello.htmlD847FC71DDCT6t/htmlCL2enTEL1c0ETCa797cd-465afCCLmav36VYL2AL0D2h4<HTML><HEAD>…
© 2008 Roy T. Fielding Apache 3.0
Unified Protocol and API
27
© 2008 Roy T. Fielding Apache 3.0
Unified Protocol and APIProtocols are the heart of a server
Apache 1.0: HTTP/1.0
Apache 1.2: HTTP/1.1
Apache 2.0: HTTP/1.1, POP3, ECHO
Apache 2.2: HTTP/1.1, POP2, ECHO, SMTP, FTP
Apache 3.0: waka, HTTP/1.1
27
© 2008 Roy T. Fielding Apache 3.0
Unified Protocol and APIProtocols are the heart of a server
Apache 1.0: HTTP/1.0
Apache 1.2: HTTP/1.1
Apache 2.0: HTTP/1.1, POP3, ECHO
Apache 2.2: HTTP/1.1, POP2, ECHO, SMTP, FTP
Apache 3.0: waka, HTTP/1.1
The request_rec is replaced with waka_recwaka messages are a tokenized data structure
memcopy, validate, pass by reference
coordinate using blackboard style, semaphores
no more DIY request/response construction
27
© 2008 Roy T. Fielding Apache 3.0
Canned Error Responses
28
© 2008 Roy T. Fielding Apache 3.0
Canned Error ResponsesStatus codes and HTML aren’t strong enough
frequently overridden by stupid browsers
often ignored by complacent users
This is the YouTube generationit’s time for some fresh thinking!
28
© 2008 Roy T. Fielding Apache 3.0
Canned Error ResponsesStatus codes and HTML aren’t strong enough
frequently overridden by stupid browsers
often ignored by complacent users
This is the YouTube generationit’s time for some fresh thinking!
Samuel L. Jacksonhighest grossing actor
over 100 movies
translated worldwide
28
© 2008 Roy T. Fielding Apache 3.0
Canned Error ResponsesStatus codes and HTML aren’t strong enough
frequently overridden by stupid browsers
often ignored by complacent users
This is the YouTube generationit’s time for some fresh thinking!
Samuel L. Jacksonhighest grossing actor
over 100 movies
translated worldwide
28
401 Oh, Hell No!
© 2008 Roy T. Fielding Apache 3.0
Canned Error ResponsesStatus codes and HTML aren’t strong enough
frequently overridden by stupid browsers
often ignored by complacent users
This is the YouTube generationit’s time for some fresh thinking!
Samuel L. Jacksonhighest grossing actor
over 100 movies
translated worldwide
28
401 Oh, Hell No!404 Where’s... my... super suit!
© 2008 Roy T. Fielding Apache 3.0
Canned Error ResponsesStatus codes and HTML aren’t strong enough
frequently overridden by stupid browsers
often ignored by complacent users
This is the YouTube generationit’s time for some fresh thinking!
Samuel L. Jacksonhighest grossing actor
over 100 movies
translated worldwide
28
401 Oh, Hell No!404 Where’s... my... super suit!
pending approval
by Mr. Jackson,
Disney, United Artists, ...
© 2008 Roy T. Fielding Apache 3.0
Summary
29
© 2008 Roy T. Fielding Apache 3.0
Summary
29
Apache 3.0is our best product
ever!
[aside from some minor implementation details]
© 2008 Roy T. Fielding Apache 3.0
Outline
a bit of history
what does a web server do
introducing Apache 3.0
the nature of collaboration
30
© 2008 Roy T. Fielding Apache 3.0
Collaboration
31
© 2008 Roy T. Fielding Apache 3.0
Collaboration
Somebody always leadswe can take turns leadingonly if we also take turns following
31
© 2008 Roy T. Fielding Apache 3.0
Collaboration
Somebody always leadswe can take turns leadingonly if we also take turns following
Apache doesn’t select the leadersleaders are defined by what they doand how enticing they are to follow
31
© 2008 Roy T. Fielding Apache 3.0
Collaboration
Somebody always leadswe can take turns leadingonly if we also take turns following
Apache doesn’t select the leadersleaders are defined by what they doand how enticing they are to follow
If you don’t like where we’re heading ... maybe it’s time for you to lead!
31
© 2008 Roy T. Fielding Apache 3.0
Collaboration
Somebody always leadswe can take turns leadingonly if we also take turns following
Apache doesn’t select the leadersleaders are defined by what they doand how enticing they are to follow
If you don’t like where we’re heading ... maybe it’s time for you to lead!
31
See you on <[email protected]>