ApacheCon Leading the Wave of 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

waka

Apache 3.0 Roy T. Fielding, Ph.D Chief Scientist, Day Software Cofounder, The Apache Software Foundation Vice President, Apache HTTP Server

© 2008 Roy T. Fielding

2

waka

T D O E Apache 3. 0 N V S O U R S P N P E A NS O C

Roy T. Fielding, Ph.D

Chief Scientist, Day Software Cofounder, The Apache Software Foundation Vice President, Apache HTTP Server

© 2008 Roy T. Fielding

2

Outline a bit of history what does a web server do introducing Apache 3.0 the nature of collaboration

© 2008 Roy T. Fielding

Apache 3.0

3

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

2500

2000

1500

1000

500

httpd-dev

© 2008 Roy T. Fielding Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

2500

0.6.2

1500

1000

500

httpd-dev

© 2008 Roy T. Fielding Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

1500

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

2500

0.6.2

0.8.0

1000

500

httpd-dev

© 2008 Roy T. Fielding Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

1500

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

2500

0.6.2

© 2008 Roy T. Fielding

1.1b1

0.8.0

1000

500

httpd-dev

Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

1500

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

2500

1.2b0

0.6.2

© 2008 Roy T. Fielding

1.1b1

0.8.0

1000

500

httpd-dev

Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

1500

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

1.2.0

2500

1.2b0

0.6.2

© 2008 Roy T. Fielding

1.1b1

0.8.0

1000

500

httpd-dev

Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

1500

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

1.2.0

2500

1.2b0

0.6.2

© 2008 Roy T. Fielding

1.2.5

1.1b1

0.8.0

1000

500

httpd-dev

Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

1500

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

1.2.0

2500

1.2b0

0.6.2

© 2008 Roy T. Fielding

1.2.5

1.1b1 1.3.0

0.8.0

1000

500

httpd-dev

Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

1500

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

1.2.0

2500

1.2b0

0.6.2

© 2008 Roy T. Fielding

1.2.5

1.1b1 1.3.0

0.8.0 1.3.4

1000

500

httpd-dev

Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

1500

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

1.2.0

2500

1.2b0

0.6.2

© 2008 Roy T. Fielding

1.2.5

1.1b1 1.3.0 1.3.9

0.8.0 1.3.4

1000

500

httpd-dev

Apache 3.0

httpd-priv apr-dev apr-priv

4

2000

1500

0 199503 199504 199505 199506 199507 199508 199509 199510 199511 199512 199601 199602 199603 199604 199605 199606 199607 199608 199609 199610 199611 199612 199701 199702 199703 199704 199705 199706 199707 199708 199709 199710 199711 199712 199801 199802 199803 199804 199805 199806 199807 199808 199809 199810 199811 199812 199901 199902 199903 199904 199905 199906 199907 199908 199909 199910 199911 199912 200001 200002 200003

HTTP Server Project First Five Years

3000

1.2.0

2500

1.2b0

0.6.2

© 2008 Roy T. Fielding

1.2.5

1.1b1

httpd-dev

Apache 3.0

2.0a1

1.3.0 1.3.9

0.8.0 1.3.4

1000

500

httpd-priv apr-dev apr-priv

4

0

© 2008 Roy T. Fielding Apache 3.0

httpd-dev httpd-priv apr-dev

200803

200801

200711

200709

200707

200705

200703

200701

200611

200609

200607

200605

200603

200601

200511

200509

200507

200505

200503

200501

200411

200409

200407

200405

200403

200401

200311

200309

200307

200305

200303

200301

200211

200209

200207

200205

200203

200201

200111

200109

200107

200105

200103

200101

200011

200009

200007

200005

200003

HTTP Server Project Last Eight Years

3000

2500

2000

1500

1000

500

apr-priv

5

0

© 2008 Roy T. Fielding Apache 3.0

httpd-dev httpd-priv apr-dev

200803

200801

200711

200709

200707

200705

200703

200701

200611

200609

200607

200605

200603

200601

200511

200509

200507

200505

200503

200501

200411

200409

200407

200405

200403

200401

200311

200309

200307

2.0a1

200305

200303

200301

200211

200209

200207

200205

200203

200201

200111

200109

200107

200105

200103

200101

200011

200009

200007

200005

200003

HTTP Server Project Last Eight Years

3000

2500

2000

1500

1000

500

apr-priv

5

0

© 2008 Roy T. Fielding Apache 3.0

httpd-dev httpd-priv apr-dev

200803

200801

200711

200709

200707

200705

200703

200701

200611

200609

200607

200605

200603

200601

200511

200509

200507

200505

200503

200501

200411

200409

200407

200405

200403

200401

200311

200309

200307

2.0a1

200305

200303

200301

200211

200209

200207

200205

200203

200201

200111

200109

200107

200105

200103

200101

200011

200009

200007

200005

200003

HTTP Server Project Last Eight Years

3000

1.3.14

2500

2000

1500

1000

500

apr-priv

5

0

© 2008 Roy T. Fielding Apache 3.0

httpd-dev httpd-priv apr-dev

200803

200801

200711

200709

200707

200705

200703

200701

200611

200609

200607

200605

200603

200601

200511

200509

200507

200505

200503

200501

200411

200409

200407

200405

200403

200401

200311

200309

200307

2.0a1

200305

200303

200301

200211

200209

200207

200205

200203

200201

200111

200109

200107

200105

200103

200101

200011

200009

200007

200005

200003

HTTP Server Project Last Eight Years

3000

2.0.14

1.3.14

2500

2000

1500

1000

500

apr-priv

5

0

© 2008 Roy T. Fielding Apache 3.0

httpd-dev httpd-priv apr-dev

200803

200801

200711

200709

200707

200705

200703

200701

200611

200609

200607

200605

200603

200601

200511

200509

200507

200505

200503

200501

200411

200409

200407

200405

200403

200401

200311

200309

200307

2.0.35

200305

200303

200301

200211

200209

200207

3000

200205

2.0a1

200203

200201

200111

200109

200107

200105

200103

200101

200011

200009

200007

200005

200003

HTTP Server Project Last Eight Years

2.0.14

1.3.14

2500

2000

1500

1000

500

apr-priv

5

0

© 2008 Roy T. Fielding Apache 3.0

httpd-dev httpd-priv apr-dev

200803

200801

200711

200709

200707

200705

200703

200701

200611

200609

200607

200605

200603

200601

200511

200509

200507

200505

200503

200501

200411

200409

200407

200405

2500

200403

200401

200311

200309

200307

2.0.35

200305

200303

200301

200211

200209

200207

3000

200205

2.0a1

200203

200201

200111

200109

200107

200105

200103

200101

200011

200009

200007

200005

200003

HTTP Server Project Last Eight Years

2.0.14

1.3.14 2.0.49

2000

1500

1000

500

apr-priv

5

0

© 2008 Roy T. Fielding Apache 3.0

httpd-dev httpd-priv apr-dev

200803

200801

200711

200709

200707

200705

200703

200701

200611

200609

200607

200605

200603

200601

200511

200509

200507

200505

200503

200501

200411

200409

200407

200405

2500

200403

200401

200311

200309

200307

2.0.35

200305

200303

200301

200211

200209

200207

3000

200205

2.0a1

200203

200201

200111

200109

200107

200105

200103

200101

200011

200009

200007

200005

200003

HTTP Server Project Last Eight Years

2.0.14

1.3.14 2.0.49 2.1.6

2000

1500

1000

500

apr-priv

5

0

© 2008 Roy T. Fielding Apache 3.0

httpd-dev httpd-priv apr-dev

200803

200801

200711

200709

200707

200705

200703

200701

200611

200609

200607

200605

200603

2.0.49

200601

1.3.14

200511

200509

200507

200505

200503

200501

200411

200409

200407

200405

2500

200403

200401

200311

200309

200307

2.0.35

200305

200303

200301

200211

200209

200207

3000

200205

2.0a1

200203

200201

200111

200109

200107

200105

200103

200101

200011

200009

200007

200005

200003

HTTP Server Project Last Eight Years

2.0.14 2.2.0

2.1.6

2000

1500

1000

500

apr-priv

5

0

© 2008 Roy T. Fielding Apache 3.0

httpd-dev httpd-priv apr-dev

200803

200801

2.1.6

200711

200709

200707

200705

200703

200701

200611

200609

200607

200605

200603

2.0.49

200601

1.3.14

200511

200509

200507

200505

200503

200501

200411

200409

200407

200405

2500

200403

200401

200311

200309

200307

2.0.35

200305

200303

200301

200211

200209

200207

3000

200205

2.0a1

200203

200201

200111

200109

200107

200105

200103

200101

200011

200009

200007

200005

200003

HTTP Server Project Last Eight Years

2.0.14 2.2.0 all

2000

1500

1000

500

apr-priv

5

Summary 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 expectations and our expectations are at the lowest point in our history!

© 2008 Roy T. Fielding

Apache 3.0

6

Outline a bit of history what does a web server do introducing Apache 3.0 the nature of collaboration

© 2008 Roy T. Fielding

Apache 3.0

7

Role of an HTTP Server

[Ralf S. Engelschall, 2000] © 2008 Roy T. Fielding

Apache 3.0

8

things a web server does read configuration listen for connections parse requests map URI and method to redirects and aliases cache access control, authenticate, authorize handler

determine response send response © 2008 Roy T. Fielding

Apache 3.0

9

Role of an Apache 1.0

Browsers/Spiders

© 2008 Roy T. Fielding

Origin Server Dynamic Content

Apache 3.0

Centralized Data FS, RDBMS

10

Role of an Apache 1.1

Proxy Proxy Cache

Browsers/Spiders

© 2008 Roy T. Fielding

Origin Server Dynamic Content

Apache 3.0

Centralized Data FS, RDBMS

11

Role of an Apache 2.0 POP3, ECHO

Proxy Proxy Cache

Browsers/Spiders

© 2008 Roy T. Fielding

Gateways/ProxyReverse Accelerator Cache

Apache 3.0

Origin Server Dynamic Content

Centralized Data FS, RDBMS

12

Role of an Apache 2.2 POP3, ECHO FTP, SMTP Proxy Proxy Cache

Browsers/Spiders

© 2008 Roy T. Fielding

Gateways/ProxyReverse Accelerator Cache

Apache 3.0

Origin Servers Dynamic Content

Centralized Data FS, RDBMS, JCR

13

Apache httpd 2.x Filters Network / Connection Input Filters Socket

Protocol / Transcode

Resource / Content Set Server

req

req

CORE_IN

SSL_IN

req HTTP_IN

req DEFLATE

Client req Socket

CORE

req SSL_OUT

HTTP HEADER

req

req

Request processing

DEFLATE

Output Filters

Filter A

Filter B

...

Brigade Bucket

Bucket

Bucket

Bucket

Bucket

Brigade

Brigade

Brigade

Filter X

...

[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/] © 2008 Roy T. Fielding

Apache 3.0

14

Summary 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 ways to 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

15

Outline a bit of history what does a web server do introducing Apache 3.0 the nature of collaboration

© 2008 Roy T. Fielding

Apache 3.0

16

It’s time for Apache 3.0

© 2008 Roy T. Fielding

Apache 3.0

17

It’s time for Apache 3.0 One 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

© 2008 Roy T. Fielding

Apache 3.0

17

It’s time for Apache 3.0 One 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 GONE httpd and httpsd are DIFFERENT executables APR is replaced by Moccasin

© 2008 Roy T. Fielding

Apache 3.0

17

It’s time for Apache 3.0 One 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 GONE httpd and httpsd are DIFFERENT executables APR is replaced by Moccasin

All APIs are based on Waka get those sticky hands off my data structures!

© 2008 Roy T. Fielding

Apache 3.0

17

It’s time for Apache 3.0 One 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 GONE httpd and httpsd are DIFFERENT executables APR is replaced by Moccasin

All APIs are based on Waka get those sticky hands off my data structures!

“Kiss my ass” compatibility © 2008 Roy T. Fielding

Apache 3.0

17

Simplify Process Model

© 2008 Roy T. Fielding

Apache 3.0

18

Simplify Process Model Modular Process Models Apache 0.3 fork model Apache 1.0 prefork model Apache 1.3 introduced non-Unix models prefork, win32 Apache 2.x introduced MPMs prefork, beos, mpmt, os2, netware, threaded, winnt, worker, event

© 2008 Roy T. Fielding

Apache 3.0

18

Simplify Process Model Modular Process Models Apache 0.3 fork model Apache 1.0 prefork model Apache 1.3 introduced non-Unix models prefork, win32 Apache 2.x introduced MPMs prefork, beos, mpmt, os2, netware, threaded, winnt, worker, event

Apache 3.0 will just use the right MPM based on whatever our own developers have tested to be the best choice for a given platform We call this the “spooning model” © 2008 Roy T. Fielding

Apache 3.0

18

Spooning Model Master Server

First-time initialization

Child Servers

master / restart initialization

Init Memory read configuration

proclaim new generation, read configuration graceful restart

detach process init scoreboard request-response loop

startup child servers & register in scoreboard

keep-alive loop

create child server processes

restart loop

wait for child's death or time-out

shutdown

child server initialization

master server loop

wait for connection request

adjust number of idle child server

shutdown or restart

clean-up free resources

kill all child server

graceful restart

kill idle child server master clean-up

wait for request killed or new generation

timeout

process request update scoreboard

close connection update scoreboard

child server clean-up

[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/] © 2008 Roy T. Fielding

Apache 3.0

19

Spooning Model Master Server

First-time initialization

Child Servers

master / restart initialization

Init Memory read configuration

proclaim new generation, read configuration graceful restart

detach process init scoreboard request-response loop

startup child servers & register in scoreboard

keep-alive loop

create child server processes

restart loop

wait for child's death or time-out

shutdown

child server initialization

master server loop

Too much Child Labor! wait for connection request

adjust number of idle child server

shutdown or restart

clean-up free resources

kill all child server

graceful restart

kill idle child server master clean-up

wait for request

killed or new generation

timeout

process request update scoreboard

close connection update scoreboard

child server clean-up

[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/] © 2008 Roy T. Fielding

Apache 3.0

19

Spooning Model Master Server

First-time initialization

Child Servers

master / restart initialization

Init Memory read configuration

proclaim new generation, read configuration graceful restart

detach process init scoreboard request-response loop

startup child servers & register in scoreboard

keep-alive loop

create child server processes

restart loop

wait for child's death or time-out

shutdown

child server initialization

master server loop

Too much Child Labor! wait for connection request

adjust number of idle child server

shutdown or restart

clean-up free resources

kill all child server

graceful restart

kill idle child server master clean-up

wait for request

killed or new generation

timeout

process request update scoreboard

close connection update scoreboard

child server clean-up

[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/] © 2008 Roy T. Fielding

Apache 3.0

19

Spooning Model Master Server

First-time initialization

Child Servers

adult serfs

master / restart initialization

Init Memory read configuration

proclaim new generation, read configuration graceful restart

detach process init scoreboard

request-response loop

startup child servers & register in scoreboard

keep-alive loop

create child server processes

restart loop

wait for child's death or time-out

shutdown

child server initialization

master server loop

Too much Child Labor! wait for connection request

adjust number of idle child server

shutdown or restart

clean-up free resources

kill all child server

graceful restart

kill idle child server master clean-up

wait for request

killed or new generation

timeout

process request update scoreboard

close connection update scoreboard

child server clean-up

[HPI Apache Modeling Project, http://apache.hpi.uni-potsdam.de/] © 2008 Roy T. Fielding

Apache 3.0

19

Less Configuration Default to SAFE and SIMPLE configuration no (default) configuration files no compile-time settings

All settings designed for PROGRAMMER TESTING start up using current owner and group listen to localhost:8080 default to content/manual all other settings must be on command-line httpd -c configuration.txt httpsd -C directory

© 2008 Roy T. Fielding

Apache 3.0

20

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 connection via the HTTP/1.1 Upgrade header field defined mapping to HTTP/1.1 for proxies

© 2008 Roy T. Fielding

Apache 3.0

21

HTTP Syntax GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n … © 2008 Roy T. Fielding

Apache 3.0

22

HTTP Syntax GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

typical headers 325-400B + cookies = 1079 Bytes

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n … © 2008 Roy T. Fielding

Apache 3.0

22

HTTP Syntax GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

typical headers 325-400B + cookies = 1079 Bytes

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n typical headers Etag: “a797cd-465af”\r\n 300-400B + Cache-control: max-age=3600\r\n set-cookies = Vary: Accept-Language\r\n 3487 Bytes \r\n 4090\r\n … © 2008 Roy T. Fielding

Apache 3.0

22

HTTP not self-descriptive GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n … © 2008 Roy T. Fielding

Apache 3.0

23

HTTP not self-descriptive GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

Control Data

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n … © 2008 Roy T. Fielding

Apache 3.0

23

HTTP not self-descriptive GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

Control Data

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n …

Message Metadata

© 2008 Roy T. Fielding

Apache 3.0

23

HTTP not self-descriptive GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

Control Data

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n …

Message Metadata Representation Metadata

© 2008 Roy T. Fielding

Apache 3.0

23

HTTP not self-descriptive GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

Control Data

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n …

Message Metadata

Representation Metadata Resource Metadata

© 2008 Roy T. Fielding

Apache 3.0

23

HTTP not self-descriptive GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

Control Data

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n …

Message Metadata

Representation Metadata Resource Metadata

Data

© 2008 Roy T. Fielding

Apache 3.0

23

HTTP not self-descriptive GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

Control Data

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n … Extensions cannot indicate scope or mandate

Message Metadata

Representation Metadata Resource Metadata

Data

© 2008 Roy T. Fielding

Apache 3.0

23

HTTP not self-descriptive GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

Control Data

Messages associated by order sent/received

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n … Extensions cannot indicate scope or mandate

Message Metadata

Representation Metadata Resource Metadata

Data

© 2008 Roy T. Fielding

Apache 3.0

23

HTTP Syntax Wasted GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n … © 2008 Roy T. Fielding

Apache 3.0

24

HTTP Syntax Wasted GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

content negotiation is a waste of bits

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Content-Language: en\r\n Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Cache-control: max-age=3600\r\n Vary: Accept-Language\r\n \r\n 4090\r\n … © 2008 Roy T. Fielding

Apache 3.0

24

HTTP Syntax Wasted GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

content negotiation is a waste of bits

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Dates need 8 Content-Language: en\r\n bytes max Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Useless product Cache-control: max-age=3600\r\n advertising Vary: Accept-Language\r\n \r\n Header names 4090\r\n need 1-2 bytes … © 2008 Roy T. Fielding

Apache 3.0

24

HTTP Syntax Wasted GET /Test/hello.html HTTP/1.1\r\n Host: kiwi.ics.uci.edu:8080\r\n Accept: text/html, text/*, */*\r\n User-Agent: GET/7 libwww-perl/5.40\r\n \r\n

content negotiation is a waste of bits

HTTP/1.1 200 OK\r\n Date: Thu, 09 Mar 2000 15:40:09 GMT\r\n Server: Apache/1.3.12\r\n Content-Type: text/html\r\n Dates need 8 Content-Language: en\r\n bytes max Transfer-Encoding: chunked\r\n Etag: “a797cd-465af”\r\n Useless product Cache-control: max-age=3600\r\n advertising Vary: Accept-Language\r\n \r\n Header names 4090\r\n need 1-2 bytes Mostly impacts low-power … and bandwidth-limited devices © 2008 Roy T. Fielding

Apache 3.0

24

HTTP/2.x Syntax ? G http://kiwi.ics.uci.edu:8080/Test/hello.html HTTP20\r\n \r\n HTTP20 200\r\n DT:47FC71DD\r\n CT:t/html\r\n CL:en\r\n TE:c\r\n ET:“a797cd-465af”\r\n CC:ma=3600\r\n VY:AL\r\n \r\n 4090\r\n …

© 2008 Roy T. Fielding

Apache 3.0

25

Waka Syntax

waka22\r\n QAG100#http://kiwi.ics.uci.edu:8080/Test/hello.html SSakaw\r\n waka22\r\n RAG120#http://kiwi.ics.uci.edu:8080/Test/hello.html D847FC71DDCT6t/htmlCL2enTEL1c0ETCa797cd-465afCCLmav36VYL2AL0 D2h4…

© 2008 Roy T. Fielding

Apache 3.0

26

Unified Protocol and API

© 2008 Roy T. Fielding

Apache 3.0

27

Unified Protocol and API Protocols 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

© 2008 Roy T. Fielding

Apache 3.0

27

Unified Protocol and API Protocols 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_rec waka messages are a tokenized data structure memcopy, validate, pass by reference coordinate using blackboard style, semaphores no more DIY request/response construction

© 2008 Roy T. Fielding

Apache 3.0

27

Canned Error Responses

© 2008 Roy T. Fielding

Apache 3.0

28

Canned Error Responses Status codes and HTML aren’t strong enough frequently overridden by stupid browsers often ignored by complacent users

This is the YouTube generation it’s time for some fresh thinking!

© 2008 Roy T. Fielding

Apache 3.0

28

Canned Error Responses Status codes and HTML aren’t strong enough frequently overridden by stupid browsers often ignored by complacent users

This is the YouTube generation it’s time for some fresh thinking!

Samuel L. Jackson highest grossing actor over 100 movies translated worldwide

© 2008 Roy T. Fielding

Apache 3.0

28

Canned Error Responses Status codes and HTML aren’t strong enough frequently overridden by stupid browsers often ignored by complacent users

This is the YouTube generation it’s time for some fresh thinking!

Samuel L. Jackson highest grossing actor over 100 movies translated worldwide

401 Oh, Hell No! © 2008 Roy T. Fielding

Apache 3.0

28

Canned Error Responses Status codes and HTML aren’t strong enough frequently overridden by stupid browsers often ignored by complacent users

This is the YouTube generation it’s time for some fresh thinking!

Samuel L. Jackson highest grossing actor over 100 movies translated worldwide

401 Oh, Hell No! 404 Where’s... my... super suit! © 2008 Roy T. Fielding

Apache 3.0

28

Canned Error Responses Status codes and HTML aren’t strong enough frequently overridden by stupid browsers often ignored by complacent users

This is the YouTube generation it’s time for some fresh thinking!

pe nd D isn by ing Samuel L. Jackson M e a y, r highest grossing actor Un . Ja ppro over 100 movies ite ck va d A son l translated worldwide rt , ist 401 Oh, Hell No! s, ... 404 Where’s... my... super suit! © 2008 Roy T. Fielding

Apache 3.0

28

Summary

© 2008 Roy T. Fielding

Apache 3.0

29

Summary

Apache 3.0 is our best product ever! [aside from some minor implementation details] © 2008 Roy T. Fielding

Apache 3.0

29

Outline a bit of history what does a web server do introducing Apache 3.0 the nature of collaboration

© 2008 Roy T. Fielding

Apache 3.0

30

Collaboration

© 2008 Roy T. Fielding

Apache 3.0

31

Collaboration Somebody always leads we can take turns leading only if we also take turns following

© 2008 Roy T. Fielding

Apache 3.0

31

Collaboration Somebody always leads we can take turns leading only if we also take turns following

Apache doesn’t select the leaders leaders are defined by what they do and how enticing they are to follow

© 2008 Roy T. Fielding

Apache 3.0

31

Collaboration Somebody always leads we can take turns leading only if we also take turns following

Apache doesn’t select the leaders leaders are defined by what they do and how enticing they are to follow

If you don’t like where we’re heading ... maybe it’s time for you to lead!

© 2008 Roy T. Fielding

Apache 3.0

31

Collaboration Somebody always leads we can take turns leading only if we also take turns following

Apache doesn’t select the leaders leaders are defined by what they do and how enticing they are to follow

If you don’t like where we’re heading ... maybe it’s time for you to lead!

See you on © 2008 Roy T. Fielding

Apache 3.0

31