Top Banner
jim jagielski [email protected] [email protected] [email protected] Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating to Apache 2.0
35

Jim jagielski [email protected] [email protected] [email protected] Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

Mar 26, 2015

Download

Documents

Kimberly Fuller
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Happy Trails:Migrating to Apache 2.0

A Top Level Guide to theWhy and How

Of Migrating to Apache 2.0

Page 2: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Agenda

Why Apache? Why Apache 2.0 (what’s new) Migration from Apache 1.3 Migration from iPlanet / SunOne Migration from IIS

Page 3: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Why Apache?

Extremely portable Completely Open Source Proven track-record Most popular web server on the

planet Support available from informal

and formal channels

Page 4: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

What’s New in Apache 2.0

Multi-processing modules Hooks registered at run-time Modules helping each other Filtering framework Protocol modules Apache Portable Run-time Build system

Page 5: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Multi-Processing Modules

Apache can be run as a process-based server, a thread-based one or a hybrid.

Allows Apache to be tailored for each platform

Allows system administrators control over how their site runs

Allows for admin control over robustness and scalability

Page 6: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Prefork MPM

Robust Proven technology (Apache 1.3) Not incredibly scalable Removes some optimization options (caching)

Page 7: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Worker MPM

More scalable Less robust Less reliable Thread-safeness of libs critical

Page 8: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Perchild MPM (experimental)

Most scalable Least robust Allows for better virtual host support

(perchild uses file descriptor passing)

Page 9: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Windows MPM

Very scalable Takes advantage of Windows native API Allows for Apache on Windows to be a

real contender!

Page 10: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

mod_cgid

Forking threaded processes kills performance

mod_cgid creates a CGI daemon that actually forks the CGI process

Page 11: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

mod_cgid

Page 12: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Apache Framework

ftphttp Pop3

Protocol Modules Apache is no longer “just a Web

server!" It is possible to create protocol

moduleso mod_perl 2.0 already supports PMs

Page 13: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Apache Portable Run-time

Apache 1.3 was ported to almost every platform imaginableo It only really worked well on Unixo The assumption was always Posix

Apache 2.0 is ported to almost every platform imaginableo It works well on all of themo And can be ported to more platforms

easily!o The Apache code is much cleaner!

Page 14: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

APR

Application

Operating System

apr.apache.org

Apache Portable Run-time

Page 15: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Migration from Apache 1.3

Why Migrate?

o Scalability improvementso Better utilization of server resourceso More robust proxy implementationo Easier for in-house module developmento Much better support for non-Unix platformso Utilization of additional protocolso All new development focuses on 2.0o Build system uses GNU autoconf

Page 16: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Migration from Apache 1.3

Potential Gotchaso Changes in directives (some went away,

like Port, and others are changed)o Availability of 3rd party modules (not yet

ported to Apache 2.0)o Questions and concerns on thread-

safeness of various modules (only a real concern with threaded MPMs)

Page 17: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Migration from Apache 1.3

Howo Easiest migrationo Look through httpd.confo Most likely, stay with Prefork at first

(same tuning as 1.3)o Move to Worker when appropriate

• Check out modules and libraries• OS has good threading implementation?

Page 18: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Migration from iPlanet/SunOne

Why?o Apache is finally threaded!o Better performance and reliabilityo Open Standards / Open Sourceo Some question commitment to Web

Server layero More control for the Administratoro Leverage module availability

Page 19: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Migration from iPlanet/SunOne

Potential Gotchaso Very different configuration and

administrationo Does Apache provide the same “control”

and capability that iPlanet/SunOne does?o Application Server “bundled in”o It’s a “sweet suite”

Page 20: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Migration from iPlanet/SunOne

Howo Get up to speed on terminology

differences (backup slides)o Prefork or Worker? Now no longer need

separate iPlanet instances.o Look at dynamic content: what makes

sense to port to server-side or application. In many cases, Tomcat helps!

o Need AdminServer? Check out open source and commercial offerings.

Page 21: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Migration from IIS

Why?o Security!o Other “traditional” open source

advantageso VERY similar native performanceo Leverage the number of modules

available for Apacheo Opens up migration opportunities

Page 22: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Migration from IIS

Potential Gotchaso BIG cultural shift.o I need a GUI.o Does Apache interface with everything I

need (MS centric infrastructure)?o Mistrust

Page 23: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Migration from IIS

How?o For many, simple “drop in” replacement

• Apache includes ISAPI interface• Commercial support for .NET• Some interfaces still not as clean as one

would likeo Protecting IIS via Apache Reverse Proxy

• Eases migration path• Reduces risk with no decrease in functionality• Minimal impact on developers

Page 24: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Thank you !

Q&A That's all folks!

Page 25: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

Backup Slides

Various backup slides

Page 26: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:Languages/Backends

Netscapeo CGIo Java (LiveConnect)o Javascripto SAF/NSAPI

Apacheo CGIo Java (Tomcat,

JServ)o php, perl, lotso iAPI

Page 27: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:Directives

Netscapeo Inito AuthTranso PathChecko NameTranso ObjectTypeo Serviceo Erroro AddLog

Apacheo init (configs)o auth/checko accesso translateo type_checkero handlero redirect()o log()

Page 28: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:Directives (Init)

Netscape - Inito cache-init, init-clf, init-cgi

Init fn=load-modules shlib=/lib/msqlath.so

funcs=msql_auth

AuthTrans fn=basic-auth auth-type=basic userfn=sql_auth

Page 29: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:Directives (Init)

Apache: Init, Command Table

LoadModule msqlauth_module/lib/msqlauth.so

<Directory /private>AuthType BasicAuthmSQL_Table foo...

Page 30: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:“Homepage”

Netscape 3.xo PathCheck fn=find-index index-

names=index.html,home.html

Apache 1.xo DirectoryIndex index.html home.html

Page 31: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:Error logging

Netscapeo Error fn=send-error code=401

path=/spot/errors/401.html

Apacheo ErrorDocument /spot/errors/401.html

Page 32: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:Extensible logging

Netscapeo AddLog fn=recordit name=browserlog

Flex-log %Ses->client.ip%

Apacheo mod_log_config/CustomLog

• “%a”

Page 33: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:Service

Netscapeo Service type=text/html method=GET

fn=append-trailer trailer="<hr><img src=/logo.gif> Copyright 1995"

o ‘parse-html’

Apacheo no direct equivalent o mod_includeo mod_ext_filter

Page 34: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:SAF Interface

Netscapeo Co pb/pblocko sn/Sessiono rq/Requesto Result Codeso Memory Mgt

Apache 2.xo C, Perl, Javao conf/tableso session_reco request_reco Result Codeso pools

Page 35: Jim jagielski jim@apache.org jim@jaguNET.com jimj@covalent.net Happy Trails: Migrating to Apache 2.0 A Top Level Guide to the Why and How Of Migrating.

jim [email protected]

[email protected]@covalent.net

iPlanet/Apache Comparison:SAF interface (2)

Netscapeo Write ‘C’o each function

maps to an directive

o compile, linko edit obj.confo restart

Apache 2.xo Write Co each module has a

set of directives and separate handlers

o compile, linko edit httpd.confo restart