SlideShare a Scribd company logo
1 of 29
High Performance Java
Application
- Apache, Jserv, Oracle JSP
이창우
Application Server Team
iPlatform실
제품기술본부
한국오라클
Contents
 Apache
 JServ
 Oracle JServ Extension
 Oracle JSP
Apache
Parent
Process
Child
Process
mod_xx
Child
Process
Child
Process
mod_xx
HTTP
JServ
Process
JServ
Process
JServ
Process
JSP
mod_xx
mod_xx
httpd Process
 Max Children
– MaxClients : Default 150, Maximum 1024
 Threads on NT
Apache 실행 방법 & 환경 File
 실행방법
– <9IAS_HOME>/Apache/Apache/bin/apachectl 이용
– apachectl 이용법
 start | stop | restart | fullstatus | status | graceful |
configtest | help | -f <config file>
 예) 시작 : apachectl start
 환경 File
– <9IAS_HOME>/Apache/Apache/conf/httpd.conf
– <9IAS_HOME>/Apache/Apache/conf/oracle_apache.conf
– <9IAS_HOME>/Apache/Jserv/etc/jserv.conf
– jserv.properties
– zone.properties
주요 Parameter (httpd.conf)
 ServerType standalone | inetd
 StartServers 5
 TimeOut 300
 MaxRequestsPerChild 0
 Port port
 Listen [IP-address:]port
 BindAddress *
 ServerName fully-qualified-domain-name
JServ
Oracle
HTTP
Server
(Apache)
mod_jserv
JServ 소개
 100% Java Servlet Engine
– Java Servlet APIs 2.0 specification 지원
 Load Balancing 지원
HTTPS
mod_perl
mod_plsql
mod_ssl
HTTP
JDK JVM
AJP
Apache
JServ
JServ Glossary
 Servlet Zone
– Partitioning mechanism
 ex. beta & production, long-running vs quick
– the sandbox where servlets live during their life cycle
– A zone defines the security environment where the
executing servlet is restricted and allows context
separation between different logical groups of
servlets.
 Servlet Repository
– a collection of servlets and may either be a directory
or an archive, such as zip or jar file
JServ 내부 구조
JServConnection
JServConnection
JServConnection
무한 Loop
JServConnection jservconnection = new JServConnection();
Thread thread = new Thread(jservconnection);
thread.setDaemon(true);
Socket socket = listenSocket.accept();
jservconnection.init(socket, semaphore);
JServ
ServerManagerTable Zone1 ServletManager1
Zone2 ServletManager2
Zone3 ServletManager3
Servlet1 ServletContext1
Servlet2 ServletContext2
Servlet3 ServletContext3
JServConnection
• Servlet Reload Check
• Servlet Load
• Servlet 실행 ServletContext
javax.servlet.Servlet servlet
java.util.Properties initargs
java.lang.String aliasName
AJP Message
JServ 주요 Parameter (jserv.properties)
 Classpath 지정
– wrapper.classpath=/aa/lib/bb.jar
– wrapper.classpath=/aa/lib/cc.jar
 JServ Communication 환경 설정
– wrapper.protocol=ajpv12
– port=8007
 Servlet Zone 설정
– zone=zone1, zone2
– zone1.properties=/aa/zone1.properties
– zone2.properties=/aa/zone2.properties
 Thread 수
– security.maxConnections=50
JServ 주요 Parameter (zone.properties) (1)
 Classloader 환경 설정
– autoreload.classes=true
– autoreload.file=true
– init.timeout=10000
– destroy.timeout=10000
 Session 환경 지정
– session.useCookies=true
– session.timeout=1800000
– session.checkFrequency=30000
JServ 주요 Parameter (zone.properties) (2)
 Repository 설정
– repository=/aa/servlets
– repository=/aa/servlets/Parallel.jar
 OJSP 환경 설정
– servlet.ojsp.code=oracle.jsp.JspServlet
– servlet.ojsp.initArgs=alias_translation=false
 Auto Startup, Init Parameter 지정
– servlet.startup=hellp,snoop,org.fool.Dummy
– servlet.hello.code=org.fool.Dummy
– servlet.default.initArgs=common.to.everybody=Hi !
– Servlet.org.fool.Dummy.initArgs=message=dummy
JServ Memory 환경 설정
 ApJServManual Parameter Setting
– default : off
 Automatic JServ Startup Mode (ApjServManual off)
– wrapper.bin.parameters=-ms30M
– wrapper.bin.parameters=-mx200M
 User Startup Mode (ApjServManual on)
– java -ms30M -mx200M org.apache.jserv.JServ ...
JServ : Scalability
 여러 개의 JServ Instances
– Single Instance에 비해 좋은 이유
 하나의 JVM에서 몇 천 개의 Threads 실행 문제 해결
 중복을 통한 시스템의 안정성 증가
 보안 향상
- 서로 다른 Servlet Zone으로
– AJP Protocol의 사용
 Socket 기반 Protocol
 다양한 구성 가능
- 여러 대의 Machine에 JServ 위치 가능
JServ : Load Balancing
 mod_Jserv
– Weighted Random Routing (Round-Robin 방식)
[ Apach JServ Configuration File ]
ApJServManual on
ApJServMount /servlet balance://set1/zone1
ApJServBalance set1 jserv1
ApJServBalance set1 jserv2 4
ApJServHost jserv1 ajpv12://localhost:9011
ApJServHost jserv2 ajpv12://localhost:9012
ApJServRoute JS1 jserv1
ApJServRoute JS2 jserv2
ApJServShmFile /home3/9ias/kp/logs/mod_jserv.shm
Weight 4
Routing Parameter (Session 처리용)
JServ : Session 관리 & Fault Tolerance
httpd
httpd
httpd
JServ1
localhost:9011
JServ2
localhost:9012
1. 첫 번째 Request (Session 이용) :
임의의 JServ 선택 (JServ1)
Shared Memory
2. 두 번째 Request (Session 이용) :
JServ1 선택
1.에서 얻은 Routing 정보 이용
3. 세 번째 Request (Session 이용) :
JServ1에 연결할 수 없는 경우
JServ1의 내부 상태를 Shared File에 기록
JServ2 선택 : 새로운 Session Object 생성
Watchdog Process
10초마다 한번씩 일어나 Shared Memory를 이용해서
Dead JServ Process 연결 시도
SessionID = xxx-JS1
SessionID = xxx-JS2
Multiple JServ 실행 환경
 Apache 환경
– Apache JServ Configuration File 작성
 실행 Script
– nohup $JAVA -Dport=9011 $JAVA_ENV -classpath
$CLASSES org.apache.jserv.JServ
$JSERV_CONF/jserv9011.properties >>
$JSERV_LOG/jserv9011.runtime 2>&1 &
 Shutdown
– -s option 추가
Oracle JServ Extension
Apache Parent Process
Watchdog Process
Memory Map File
Apache Child Process
Http requests
AJPV12
mod_jserv
Watch dog periodically pings
“dead” JServ processes and
if one is successfully pinged,
it’s status is changed to “alive”
Marks a JServ process as
“dead” if it fails to send a request
to that JServ process
JServ Process
The old Apache infrastructure
(with JServ)
Issues with the Old Apache-JServ
 오직 하나의 JServ Process만이 Automatic Mode로
시작, 재시작, 종료가 가능.
 여러 개의 JServ의 시작, 재시작, 종료를 위해서는
Manual Mode이어야 함.
 Hi-Availability의 제한적 지원
– Death Detection이 가능하지만 자동적인 재시작은
지원하지 않음
 Platform Constraints
– Unix에서만 Watchdog 제공
During startup,
registers process
info to
mod_oprocmgr
via HTTP
Http requests
AJP12
Watchdog pings “dead”
JServ processes,
starting up replacement
processes if necessary
JServ Process
JServ Wrapper
Current state (alive/dead), port-number
and other info for each server process
Handles topology maintenance messages
Apache Parent Process
Apache Child Process
mod_jserv
mod_oprocmgr
Memory Map File
Process Table
Enhanced
Watchdog
process
Enhanced Apache Infrastructure
Enhanced Apache Infrastructure
 mod_oprocmgr
– handles topology management (admin) http requests
 Server 등록
– Jserv는 HTTP 메시지를 Apache에게 보냄
– 이 메시지는 mod_oprocmgr이 관리
 향상된 Watchdog Process
 간단해진 구성
 모든 JServ Process들이 Automatic Mode로 시작,
종료 가능
 자동화된 Death Detection 및 재시작
Oracle JSP
Apache에서의 Oracle JSP 소개
 Oracle JSP는 Servlet으로 구현되어 있음
– ApJServAction .jsp /servlets/oracle.jsp.JspServlet
 Oracle Jdeveloper에 통합되어 있음
– Source-level debugging on local servlet runner
 Runs on any standard servlet engine
– Apache (iAS), JSWDK, Tomcat
– All Oracle servlet engines
 Implements useful extensions
– SQLJ in scriptlets, command-line translator ojspc,
custom tag library and data access beans
Configuring OracleJSP on iAS
 Libraries
– ojsp.jar
– ojsputil.jar
 These libraries must be in classpath
– wrapper.classpath=…/ojsp/lib/ojsp.jar
 For Jserv/iAS, OracleJSP needs both servlet 2.0
and 2.1[2] libraries in classpath:
– wrapper.classpath=…/jsdk2.0/lib/jsdk.jar
– wrapper.classpath=…/ojsp/lib/servlet.jar
 Works with JDK 1.1 and 1.2
Apache1.ppt

More Related Content

Similar to Apache1.ppt

I know why your Java is slow
I know why your Java is slowI know why your Java is slow
I know why your Java is slowaragozin
 
JBoss AS Upgrade
JBoss AS UpgradeJBoss AS Upgrade
JBoss AS Upgradesharmami
 
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and NagiosNagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and NagiosNagios
 
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Command Prompt., Inc
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionIan Barber
 
Introduction to Java performance tuning
Introduction to Java performance tuningIntroduction to Java performance tuning
Introduction to Java performance tuningMarouane Gazanayi
 
ApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache KarafApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache KarafAchim Nierbeck
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderIsuru Perera
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksPuppet
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksCarlos Sanchez
 
Apache Falcon - Sanjeev Tripurari
Apache Falcon - Sanjeev TripurariApache Falcon - Sanjeev Tripurari
Apache Falcon - Sanjeev TripurariDevOpsBangalore
 
"Swoole: double troubles in c", Alexandr Vronskiy
"Swoole: double troubles in c", Alexandr Vronskiy"Swoole: double troubles in c", Alexandr Vronskiy
"Swoole: double troubles in c", Alexandr VronskiyFwdays
 
Apache Submarine: Unified Machine Learning Platform
Apache Submarine: Unified Machine Learning PlatformApache Submarine: Unified Machine Learning Platform
Apache Submarine: Unified Machine Learning PlatformWangda Tan
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & ToolsIan Barber
 
20150918 klug el performance tuning-v1.4
20150918 klug el performance tuning-v1.420150918 klug el performance tuning-v1.4
20150918 klug el performance tuning-v1.4Jinkoo Han
 
Pegasus - automate, recover, and debug scientific computations
Pegasus - automate, recover, and debug scientific computationsPegasus - automate, recover, and debug scientific computations
Pegasus - automate, recover, and debug scientific computationsRafael Ferreira da Silva
 

Similar to Apache1.ppt (20)

I know why your Java is slow
I know why your Java is slowI know why your Java is slow
I know why your Java is slow
 
JBoss AS Upgrade
JBoss AS UpgradeJBoss AS Upgrade
JBoss AS Upgrade
 
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and NagiosNagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
Nagios Conference 2012 - Sheeri Cabral - Alerting With MySQL and Nagios
 
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
Building tungsten-clusters-with-postgre sql-hot-standby-and-streaming-replica...
 
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 VersionDebugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
 
Introduction to Java performance tuning
Introduction to Java performance tuningIntroduction to Java performance tuning
Introduction to Java performance tuning
 
ApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache KarafApacheCon EU 2014: Enterprise Development with Apache Karaf
ApacheCon EU 2014: Enterprise Development with Apache Karaf
 
Varnish
VarnishVarnish
Varnish
 
Java Performance and Using Java Flight Recorder
Java Performance and Using Java Flight RecorderJava Performance and Using Java Flight Recorder
Java Performance and Using Java Flight Recorder
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
 
Apache Falcon - Sanjeev Tripurari
Apache Falcon - Sanjeev TripurariApache Falcon - Sanjeev Tripurari
Apache Falcon - Sanjeev Tripurari
 
Apache Falcon DevOps
Apache Falcon DevOpsApache Falcon DevOps
Apache Falcon DevOps
 
"Swoole: double troubles in c", Alexandr Vronskiy
"Swoole: double troubles in c", Alexandr Vronskiy"Swoole: double troubles in c", Alexandr Vronskiy
"Swoole: double troubles in c", Alexandr Vronskiy
 
Apache Submarine: Unified Machine Learning Platform
Apache Submarine: Unified Machine Learning PlatformApache Submarine: Unified Machine Learning Platform
Apache Submarine: Unified Machine Learning Platform
 
J boss
J bossJ boss
J boss
 
wtf is in Java/JDK/wtf7?
wtf is in Java/JDK/wtf7?wtf is in Java/JDK/wtf7?
wtf is in Java/JDK/wtf7?
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
20150918 klug el performance tuning-v1.4
20150918 klug el performance tuning-v1.420150918 klug el performance tuning-v1.4
20150918 klug el performance tuning-v1.4
 
Pegasus - automate, recover, and debug scientific computations
Pegasus - automate, recover, and debug scientific computationsPegasus - automate, recover, and debug scientific computations
Pegasus - automate, recover, and debug scientific computations
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Apache1.ppt

  • 1.
  • 2. High Performance Java Application - Apache, Jserv, Oracle JSP
  • 4. Contents  Apache  JServ  Oracle JServ Extension  Oracle JSP
  • 7. Apache 실행 방법 & 환경 File  실행방법 – <9IAS_HOME>/Apache/Apache/bin/apachectl 이용 – apachectl 이용법  start | stop | restart | fullstatus | status | graceful | configtest | help | -f <config file>  예) 시작 : apachectl start  환경 File – <9IAS_HOME>/Apache/Apache/conf/httpd.conf – <9IAS_HOME>/Apache/Apache/conf/oracle_apache.conf – <9IAS_HOME>/Apache/Jserv/etc/jserv.conf – jserv.properties – zone.properties
  • 8. 주요 Parameter (httpd.conf)  ServerType standalone | inetd  StartServers 5  TimeOut 300  MaxRequestsPerChild 0  Port port  Listen [IP-address:]port  BindAddress *  ServerName fully-qualified-domain-name
  • 10. Oracle HTTP Server (Apache) mod_jserv JServ 소개  100% Java Servlet Engine – Java Servlet APIs 2.0 specification 지원  Load Balancing 지원 HTTPS mod_perl mod_plsql mod_ssl HTTP JDK JVM AJP Apache JServ
  • 11. JServ Glossary  Servlet Zone – Partitioning mechanism  ex. beta & production, long-running vs quick – the sandbox where servlets live during their life cycle – A zone defines the security environment where the executing servlet is restricted and allows context separation between different logical groups of servlets.  Servlet Repository – a collection of servlets and may either be a directory or an archive, such as zip or jar file
  • 12. JServ 내부 구조 JServConnection JServConnection JServConnection 무한 Loop JServConnection jservconnection = new JServConnection(); Thread thread = new Thread(jservconnection); thread.setDaemon(true); Socket socket = listenSocket.accept(); jservconnection.init(socket, semaphore); JServ ServerManagerTable Zone1 ServletManager1 Zone2 ServletManager2 Zone3 ServletManager3 Servlet1 ServletContext1 Servlet2 ServletContext2 Servlet3 ServletContext3 JServConnection • Servlet Reload Check • Servlet Load • Servlet 실행 ServletContext javax.servlet.Servlet servlet java.util.Properties initargs java.lang.String aliasName AJP Message
  • 13. JServ 주요 Parameter (jserv.properties)  Classpath 지정 – wrapper.classpath=/aa/lib/bb.jar – wrapper.classpath=/aa/lib/cc.jar  JServ Communication 환경 설정 – wrapper.protocol=ajpv12 – port=8007  Servlet Zone 설정 – zone=zone1, zone2 – zone1.properties=/aa/zone1.properties – zone2.properties=/aa/zone2.properties  Thread 수 – security.maxConnections=50
  • 14. JServ 주요 Parameter (zone.properties) (1)  Classloader 환경 설정 – autoreload.classes=true – autoreload.file=true – init.timeout=10000 – destroy.timeout=10000  Session 환경 지정 – session.useCookies=true – session.timeout=1800000 – session.checkFrequency=30000
  • 15. JServ 주요 Parameter (zone.properties) (2)  Repository 설정 – repository=/aa/servlets – repository=/aa/servlets/Parallel.jar  OJSP 환경 설정 – servlet.ojsp.code=oracle.jsp.JspServlet – servlet.ojsp.initArgs=alias_translation=false  Auto Startup, Init Parameter 지정 – servlet.startup=hellp,snoop,org.fool.Dummy – servlet.hello.code=org.fool.Dummy – servlet.default.initArgs=common.to.everybody=Hi ! – Servlet.org.fool.Dummy.initArgs=message=dummy
  • 16. JServ Memory 환경 설정  ApJServManual Parameter Setting – default : off  Automatic JServ Startup Mode (ApjServManual off) – wrapper.bin.parameters=-ms30M – wrapper.bin.parameters=-mx200M  User Startup Mode (ApjServManual on) – java -ms30M -mx200M org.apache.jserv.JServ ...
  • 17. JServ : Scalability  여러 개의 JServ Instances – Single Instance에 비해 좋은 이유  하나의 JVM에서 몇 천 개의 Threads 실행 문제 해결  중복을 통한 시스템의 안정성 증가  보안 향상 - 서로 다른 Servlet Zone으로 – AJP Protocol의 사용  Socket 기반 Protocol  다양한 구성 가능 - 여러 대의 Machine에 JServ 위치 가능
  • 18. JServ : Load Balancing  mod_Jserv – Weighted Random Routing (Round-Robin 방식) [ Apach JServ Configuration File ] ApJServManual on ApJServMount /servlet balance://set1/zone1 ApJServBalance set1 jserv1 ApJServBalance set1 jserv2 4 ApJServHost jserv1 ajpv12://localhost:9011 ApJServHost jserv2 ajpv12://localhost:9012 ApJServRoute JS1 jserv1 ApJServRoute JS2 jserv2 ApJServShmFile /home3/9ias/kp/logs/mod_jserv.shm Weight 4 Routing Parameter (Session 처리용)
  • 19. JServ : Session 관리 & Fault Tolerance httpd httpd httpd JServ1 localhost:9011 JServ2 localhost:9012 1. 첫 번째 Request (Session 이용) : 임의의 JServ 선택 (JServ1) Shared Memory 2. 두 번째 Request (Session 이용) : JServ1 선택 1.에서 얻은 Routing 정보 이용 3. 세 번째 Request (Session 이용) : JServ1에 연결할 수 없는 경우 JServ1의 내부 상태를 Shared File에 기록 JServ2 선택 : 새로운 Session Object 생성 Watchdog Process 10초마다 한번씩 일어나 Shared Memory를 이용해서 Dead JServ Process 연결 시도 SessionID = xxx-JS1 SessionID = xxx-JS2
  • 20. Multiple JServ 실행 환경  Apache 환경 – Apache JServ Configuration File 작성  실행 Script – nohup $JAVA -Dport=9011 $JAVA_ENV -classpath $CLASSES org.apache.jserv.JServ $JSERV_CONF/jserv9011.properties >> $JSERV_LOG/jserv9011.runtime 2>&1 &  Shutdown – -s option 추가
  • 22. Apache Parent Process Watchdog Process Memory Map File Apache Child Process Http requests AJPV12 mod_jserv Watch dog periodically pings “dead” JServ processes and if one is successfully pinged, it’s status is changed to “alive” Marks a JServ process as “dead” if it fails to send a request to that JServ process JServ Process The old Apache infrastructure (with JServ)
  • 23. Issues with the Old Apache-JServ  오직 하나의 JServ Process만이 Automatic Mode로 시작, 재시작, 종료가 가능.  여러 개의 JServ의 시작, 재시작, 종료를 위해서는 Manual Mode이어야 함.  Hi-Availability의 제한적 지원 – Death Detection이 가능하지만 자동적인 재시작은 지원하지 않음  Platform Constraints – Unix에서만 Watchdog 제공
  • 24. During startup, registers process info to mod_oprocmgr via HTTP Http requests AJP12 Watchdog pings “dead” JServ processes, starting up replacement processes if necessary JServ Process JServ Wrapper Current state (alive/dead), port-number and other info for each server process Handles topology maintenance messages Apache Parent Process Apache Child Process mod_jserv mod_oprocmgr Memory Map File Process Table Enhanced Watchdog process Enhanced Apache Infrastructure
  • 25. Enhanced Apache Infrastructure  mod_oprocmgr – handles topology management (admin) http requests  Server 등록 – Jserv는 HTTP 메시지를 Apache에게 보냄 – 이 메시지는 mod_oprocmgr이 관리  향상된 Watchdog Process  간단해진 구성  모든 JServ Process들이 Automatic Mode로 시작, 종료 가능  자동화된 Death Detection 및 재시작
  • 27. Apache에서의 Oracle JSP 소개  Oracle JSP는 Servlet으로 구현되어 있음 – ApJServAction .jsp /servlets/oracle.jsp.JspServlet  Oracle Jdeveloper에 통합되어 있음 – Source-level debugging on local servlet runner  Runs on any standard servlet engine – Apache (iAS), JSWDK, Tomcat – All Oracle servlet engines  Implements useful extensions – SQLJ in scriptlets, command-line translator ojspc, custom tag library and data access beans
  • 28. Configuring OracleJSP on iAS  Libraries – ojsp.jar – ojsputil.jar  These libraries must be in classpath – wrapper.classpath=…/ojsp/lib/ojsp.jar  For Jserv/iAS, OracleJSP needs both servlet 2.0 and 2.1[2] libraries in classpath: – wrapper.classpath=…/jsdk2.0/lib/jsdk.jar – wrapper.classpath=…/ojsp/lib/servlet.jar  Works with JDK 1.1 and 1.2