Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
The App Server, Web Server and Everything in Between 
Hari Krishna Kallae, Adobe 
Immanuel Noel, Adobe 
© 2014 Adobe Syste...
ColdFusion 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
And 
Tomcat 
Agenda 
ColdFusion a...
ColdFusion 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
And 
Tomcat 
Agenda 
ColdFusion a...
ColdFusion and Tomcat 
ColdFusion 9 ColdFusion 10+ 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confiden...
Request Flow in the Built-In WebServer 
Request 1 Request 2 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe...
Modifications to the bundled Tomcat 
 Directory Structure 
 CGI scope variables support 
 SES (Search Engine Safe) URL ...
Modifications to the bundled Tomcat: Directory Structure 
Directory structure matches earlier versions 
© 2014 Adobe Syste...
Modifications to the bundled Tomcat: CGI scope variables 
Many CGI scopes were not supported as Tomcat did not 
had a way ...
Modifications to the bundled Tomcat: SES URL Support 
http://domain.com/index.cfm/about/contact/ 
ColdFusion Page: index.c...
Modifications to the bundled Tomcat: Session Replication in Cluster 
Session replication 
Instance 1 Instance 2 Instance 3...
Modifications to the bundled Tomcat: Multiple webroot support 
Request 1 Request 2 
Tomcat 
© 2014 Adobe Systems Incorpora...
Modifications to the bundled Tomcat: Output buffer size 
 Vanilla Tomcat connector performance was low due to limitations...
Update to ColdFusion in October 2014 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
13 
Col...
Configuration Tweaks 
Server.xml 
Web.xml 
Logging 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confiden...
Server.xml: Web Server Configuration 
<!-- internal webserver start --> 
<Connector port="8500" protocol="HTTP/11" 
connec...
Server.xml: Default Webroot 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
16 
<Context pat...
Server.xml: Virtual Directory 
To add a virtual directory, uncomment context tag in server.xml 
<Context path="/" 
docBase...
Web.xml: Directory Browsing 
C:ColdFusion11cfusionruntimeconfweb.xml 
<servlet> 
<servlet-name>default</servlet-name> 
<se...
Logging 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
19
C:ColdFusion11cfusionlibNeo-logging.xml 
 maxOutLogSize – Log file size 
 maxOutFileBackup – Number of Archives 
By defa...
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
Demo
Summary 
Modifications to the Tomcat Web Server 
ColdFusion Updates 
Configuration Tweaks 
© 2014 Adobe Systems Incorporat...
Revisiting the Agenda… 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
Web 
Servers 
And 
Co...
Web Servers & Connectors 
ColdFusion + Tomcat 
Apache 
HTTPD 
Web Server 
Connector 
Internet 
Information 
Services 
© 20...
Connector 
ColdFusion + Tomcat 
A connection between the ColdFusion server and webservers 
Built separately for 14 differe...
WsConfig Tool 
ColdFusion + Tomcat 
Apache 
HTTPD 
Web Server 
Connector (WSConfig tool) 
Internet 
Information 
Services ...
The Web Server Configuration Tool 
-ws apache 
–dir <Apache>/conf/ 
-bin <Apache>/bin/httpd 
–script <Apache>/bin/apachect...
Web Servers & Connectors 
ColdFusion + Tomcat 
Apache 
HTTPD 
Web Server 
Connector (WSConfig tool) 
Internet 
Information...
The Apache Connector 
Apache 2.4 support for CF 10 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confiden...
The Apache Connector: Ubuntu 
Ubuntu distributes a customized version of Apache 
And does a few things differently 
./wsco...
Web Servers & Connectors 
ColdFusion + Tomcat 
Apache 
HTTPD 
Web Server 
Connector (WSConfig tool) 
Internet 
Information...
The IIS Connector 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
Demo 
Setting up the Conne...
Configuring with IIS: Tuning 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
1. Connection P...
Web Servers & Connectors 
ColdFusion + Tomcat 
Apache 
HTTPD 
Web Server 
Connector 
Internet 
Information 
Services 
© 20...
Other Configuration Mechanisms 
Boncode 
An IIS Connector, built by Bilal Soylu 
NGinX 
A hack 
Read: Not (yet) supported ...
Other Configuration Mechanisms: Boncode 
Boncode or ColdFusion Connector - A matter of 
Uses the AJP protocol, opposed to ...
Other Configuration Mechanisms: NginX 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
NginX ...
References 
Connector Source 
http://helpx.adobe.com/coldfusion/kb/rhel-connector-configuration.html 
IIS Connector Tuning...
Summary 
Modifications to the Tomcat Web Server 
Configuration Tweaks 
Configuration Internals with Apache and IIS 
Config...
QUESTIONS ? 
© 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 
Harikrishna Kallae 
http://hkall...
Upcoming SlideShare
Loading in …5
×

The app server, web server and everything in between

1,593 views

Published on

Published in: Software
  • Be the first to comment

The app server, web server and everything in between

  1. 1. The App Server, Web Server and Everything in Between Hari Krishna Kallae, Adobe Immanuel Noel, Adobe © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
  2. 2. ColdFusion © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. And Tomcat Agenda ColdFusion and Tomcat  Request flow in Built-in Webserver  Modifications to the Bundled Tomcat  ColdFusion updates  Configuration Tweaks Web Servers and Connectors  Apache  IIS  Other Web Servers 2
  3. 3. ColdFusion © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. And Tomcat Agenda ColdFusion and Tomcat  Request flow in Built-in Webserver  Modifications to the Bundled Tomcat  ColdFusion updates  Configuration Tweaks Web Servers and Connectors  Apache  IIS  Other Web Servers 3
  4. 4. ColdFusion and Tomcat ColdFusion 9 ColdFusion 10+ © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 4
  5. 5. Request Flow in the Built-In WebServer Request 1 Request 2 © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Tomcat – The Built in Web Server ColdFusion 5 Request 3 server.xm l web.xml
  6. 6. Modifications to the bundled Tomcat  Directory Structure  CGI scope variables support  SES (Search Engine Safe) URL support  Session replication in cluster  Multiple webroot support  Output buffer size © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 6
  7. 7. Modifications to the bundled Tomcat: Directory Structure Directory structure matches earlier versions © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 7 Exceptions:  “Instance” replaces “Multi-Server”  Server.xml replaces jrun.xml  JRE isolated from instances, to enable common access across instances  Connector specific files isolated from the core server
  8. 8. Modifications to the bundled Tomcat: CGI scope variables Many CGI scopes were not supported as Tomcat did not had a way to query the webserver AUTH_TYPE CERT_FLAGS CGI Scope HTTP_COOKIE © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 8 AUTH_PASSWORD HTTP_CONNECTION SERVER_PORT HTTPS_SERVER_SUBJECT SERVER_NAM E CERT_COOKIE HTTPS_SECRETKEYSIZE
  9. 9. Modifications to the bundled Tomcat: SES URL Support http://domain.com/index.cfm/about/contact/ ColdFusion Page: index.cfm CGI.PATH_INFO: /about/contact/ © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 9
  10. 10. Modifications to the bundled Tomcat: Session Replication in Cluster Session replication Instance 1 Instance 2 Instance 3 © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Sticky session Session replication Cluster 10 Sticky session
  11. 11. Modifications to the bundled Tomcat: Multiple webroot support Request 1 Request 2 Tomcat © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 11 Request 3 ColdFusion File exists in CF webroot Yes No External Web Server
  12. 12. Modifications to the bundled Tomcat: Output buffer size  Vanilla Tomcat connector performance was low due to limitations in Output buffer size  Tomcat connector (AJP) was built to work with 8kb packet size data  In ColdFusion the Output buffer size was increased to 64kb in AJP which shown a 15% increase in the performance © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 12
  13. 13. Update to ColdFusion in October 2014 © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 13 ColdFusion 10 Tomcat upgraded to 7.0.54 Connector upgraded to 1.2.40 Apache 2.4 Support ColdFusion 9, 9.0.1, 9.0.2 Security fixes ColdFusion 10 JDK 8 Support, Security fixes, 60+ bug fixes ColdFusion 11 Security fixes
  14. 14. Configuration Tweaks Server.xml Web.xml Logging © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 14
  15. 15. Server.xml: Web Server Configuration <!-- internal webserver start --> <Connector port="8500" protocol="HTTP/11" connectionTimeout="20000" redirectPort="8447" /> © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 15 <!-- internal webserver end --> <!-- begin connector --> <Connector port="8014" protocol="AJP/13" redirectPort="8447" tomcatAuthentication="false" /> <!-- end connector -->
  16. 16. Server.xml: Default Webroot © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 16 <Context path="/" docBase="<cf_home>wwwroot" WorkDir="<cf_home>runtimeconfCatalinalocalhosttmp"> </Context>  Do not forget to copy CFIDE and WEB-INF folders present in <cf_home>cfusionwwwroot to the new webroot folder
  17. 17. Server.xml: Virtual Directory To add a virtual directory, uncomment context tag in server.xml <Context path="/" docBase="<cf_home>wwwroot" WorkDir="<cf_home>runtimeconfCatalinalocalhosttmp" aliases="/myWebroot=C:newwebrootVD“ > </Context> Multiple virtual directories can be created with aliases aliases=“/aliasPath1=docBase1,/aliasPath2=docBase2” Do not forget to copy WEB-INF folder present in <cf_home>cfusionwwwroot to the new webroot folder © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 17 Virtual Directo ry
  18. 18. Web.xml: Directory Browsing C:ColdFusion11cfusionruntimeconfweb.xml <servlet> <servlet-name>default</servlet-name> <servlet-class> org.apache.catalina.servlets.DefaultServlet </servlet-class> <init-param> <param-name>listings</param-name> <param-value>false</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 18
  19. 19. Logging © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 19
  20. 20. C:ColdFusion11cfusionlibNeo-logging.xml  maxOutLogSize – Log file size  maxOutFileBackup – Number of Archives By default ColdFusion uses “MM/dd/yy” format If you wish to change it, you can do it by changing the columns and patterns to any standard date format <var name='pattern'> <string>"%p","%t",%d{"MM/dd/yy","HH:mm:ss"},%a,"%m%x"%n</string> </var> © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 20 Logging
  21. 21. © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Demo
  22. 22. Summary Modifications to the Tomcat Web Server ColdFusion Updates Configuration Tweaks © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 22
  23. 23. Revisiting the Agenda… © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Web Servers And Connectors ColdFusion and Tomcat Request flow in Built-in Webserver Modifications to the Bundled Tomcat ColdFusion Updates Configuration Tweaks Web Servers and Connectors Apache IIS Other Web Servers 23
  24. 24. Web Servers & Connectors ColdFusion + Tomcat Apache HTTPD Web Server Connector Internet Information Services © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 24 Other Web Servers
  25. 25. Connector ColdFusion + Tomcat A connection between the ColdFusion server and webservers Built separately for 14 different configurations Apache HTTPD Web Server Connector Internet Information Services © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 25 Other Web Servers Source Available
  26. 26. WsConfig Tool ColdFusion + Tomcat Apache HTTPD Web Server Connector (WSConfig tool) Internet Information Services © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 26 Other Web Servers
  27. 27. The Web Server Configuration Tool -ws apache –dir <Apache>/conf/ -bin <Apache>/bin/httpd –script <Apache>/bin/apachectl cluster ColdFusion Cluster Name host IP of the remote ColdFusion server norestart Avoid restarting the web server ws32 Configuring a 32bit webserver on a 64bit machine © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 27 Independent of the webserver WsConfig Parameters: <cfusion>/runtime/bin/wsconfig -ws iis –site All / <Site Name>
  28. 28. Web Servers & Connectors ColdFusion + Tomcat Apache HTTPD Web Server Connector (WSConfig tool) Internet Information Services © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 28 Other Web Servers
  29. 29. The Apache Connector Apache 2.4 support for CF 10 © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Demo Setting up the Connector Modified Apache Configurations Connector Configurations 29
  30. 30. The Apache Connector: Ubuntu Ubuntu distributes a customized version of Apache And does a few things differently ./wsconfig –ws apache © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. –dir /etc/apache2 –bin /usr/sbin/apache2ctl –script /usr/sbin/apache2ctl ./apache2ctl needs to be specified as the Apache Binary 30 Optional
  31. 31. Web Servers & Connectors ColdFusion + Tomcat Apache HTTPD Web Server Connector (WSConfig tool) Internet Information Services © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 31 Other Web Servers
  32. 32. The IIS Connector © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Demo Setting up the Connector Modified IIS Configurations Connector Configurations 32
  33. 33. Configuring with IIS: Tuning © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 1. Connection Pool Size 2. Reuse Connections (max_reuse_connections) 3. Connection Pool Timeout Values need to specified in server.xml, in addition to worker.properties 33 The Big 3 worker.properties
  34. 34. Web Servers & Connectors ColdFusion + Tomcat Apache HTTPD Web Server Connector Internet Information Services © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 34 Other Web Servers
  35. 35. Other Configuration Mechanisms Boncode An IIS Connector, built by Bilal Soylu NGinX A hack Read: Not (yet) supported by Adobe © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 35 Web Server Market Share Source: Netcraft Apache IIS NginX
  36. 36. Other Configuration Mechanisms: Boncode Boncode or ColdFusion Connector - A matter of Uses the AJP protocol, opposed to the ISAPI route that ColdFusion connector takes © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. An IIS Connector preference 36
  37. 37. Other Configuration Mechanisms: NginX © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. NginX 37 ColdFusion Source: Wikipedia
  38. 38. References Connector Source http://helpx.adobe.com/coldfusion/kb/rhel-connector-configuration.html IIS Connector Tuning http://blogs.coldfusion.com/post.cfm/coldfusion-11-iis-connector-tuning Removing Connectors Manually http://blog.immanuelnoel.com/2014/07/17/coldfusion-11-manually-remove-connector-configuration/ IIS Boncode Connector http://boncode.net/connector/webdocs/Tomcat_Connector.htm#_Toc399840617 NginX Reverse Proxy http://nginx.com/resources/admin-guide/reverse-proxy/ © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 38
  39. 39. Summary Modifications to the Tomcat Web Server Configuration Tweaks Configuration Internals with Apache and IIS Configuring with NginX and with Boncode © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. 39
  40. 40. QUESTIONS ? © 2014 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Harikrishna Kallae http://hkallae.wordpress.com Twitter: @hkallae Immanuel Noel http://blog.immanuelnoel.com Twitter: @ImmanuelNoel

×