Download presentation
Presentation is loading. Please wait.
Published byJoseph Chapman Modified over 9 years ago
1
1 Oracle 9i AS Availability and Scalability Margaret H. Mei Senior Product Manager, ST
2
2 Agenda Brief 9iAS Overview Designing and Deploying Applications –Scalability –Availability
3
3 Oracle9 i Application Server non-Oracle Data Sources Oracle9 i AS Wireless for wireless clients Database Cache Connected Clients Oracle Enteprise Manager Oracle Advanced Security Manage Your Web Infrastructure Web Cache Oracle HTTP Server powered by Apache non-Oracle Apps Oracle Internet Directory Create Personalized Portals Run All Your Web Sites & Applications Developer Kits LDAP, XML, Database Email, Unified Messaging Collaborate With Stakeholders Discoverer Reports Services Extract Business Intelligence Clickstream Intelligence Integrate Your Business Java Stored Procedures PSPs PLSQL Forms Services BC4J XML/XSL J2EE CORBA Perl Oracle Oracle Applications Interconnect Oracle Workflow Oracle Gateways Portal Internet File System
4
4 Agenda Brief 9iAS Overview Designing and Deploying Applications –Scalability –Availability
5
5 Layered Scaling Scale each tier independent of the other tiers Middle-tier: Scale its two major components –Front-end: The web server and different plug-ins that serve static files and route requests to the back-end servers –Back-end: Execute application logic written in Java (JSPs, Servlets), PL/SQL (PSPs, Stored Procedures) etc. Data-tier: Scale the data-tier
6
6 Scaling Front-end Front-end Apache Web server: Serves static resources and acts as a dispatcher for dynamic requests –The Apache server is stateless (static, mod_plsql...) –Scale on SMP - Apache process based architecture –Scale on Web Farm: Run multiple instances on a web farm (exact clones) and use a load balancing solution Software load balancers: Oracle 9i AS Web Cache, Network Dispatcher, NLBS etc. Round-Robin DNS (RRDNS) Intelligent IP or Application aware load balancing hardware like LocalDirector, BigIP, ACEDirector etc. Combination of one or more of the above
7
7 Deploying Front-end Front-End Web Server Scalability Front-end Web servers Load Balancer Oracle Web Cache Back-end servers Internet Database Shared disk PL/SQL
8
8 Deploying Front-end Multiple load balancers using RRDNS Front-end Web servers Load Balancer 1 Back-end servers Internet Database Load Balancer 2
9
9 Back-end Server : Application Design Stateless vs. stateful applications –A stateful application maintains session state information within its runtime environment between successive client calls. –A stateless application maintains no such information within its environment. It may persist state information in a common store such as a database or in the client browser.
10
10 Stateful Application Example Node A Database Node B Client Load Balancer Step-by-step example of client requests to a stateful application
11
11 Stateful Application Example Node A Database Node B Client Load Balancer Client issues request; request gets routed for service by Node A. Node A may access db to service the request Step-by-step example of client requests to a stateful application
12
12 Stateful Application Example Node A Database Client’s session state Node B Client Load Balancer Node A services request; maintains session state for Client’s session Step-by-step example of client requests to a stateful application
13
13 Client’s session state Stateful Application Example Node A Database Node B Client Load Balancer On any subsequent request, Client must be serviced by Node A (and not Node B) to access Client’s session state Step-by-step example of client requests to a stateful application
14
14 Stateless Application Example Node A Database Node B Client Load Balancer Step-by-step example of client requests to a stateless application
15
15 Stateless Application Example Node A Database Node B Client Load Balancer Client issues request; request gets routed for service by Node A Step-by-step example of client requests to a stateless application
16
16 Stateless Application Example Node A Database Client’s session state Node B Client Load Balancer Node A services request; maintains session state in Database Step-by-step example of client requests to a stateless application
17
17 Client’s session state Stateless Application Example Node A Database Node B Client Load Balancer On any subsequent request, Client may be serviced by either Node A or Node B and access session state Step-by-step example of client requests to a stateless application
18
18 Deploying Back-end: Stateless Write stateless applications that run on a cluster Front-end server(s) load balances across the back- end servers Front-end servers Load Balancer Back-end servers Internet Database JServ
19
19 Load-balancing Back-end Apache JServ on a cluster Example: Load-balancing between multiple nodes with Apache JServ. The HTTP Server will load-balance requests to Apache JServ instances. Bigger machines may be allocated more requests HTTP Server Apache JServ Client Load Balancer
20
20 Deploying Back-end Server: Stateful Stateful Applications: Use sticky routing Use Oracle 8i JVM Front-end servers Load Balancer Back-end servers Internet Database 8i JVM PL/SQL 8i JVM PL/SQL 8i JVM PL/SQL 8i JVM PL/SQL
21
21 Load-balancing HTTP Server + Oracle8 i JVM ClientNetwork Load Balancer HTTP Servers Oracle8i Listeners Oracle8i Dispatchers Oracle8i Shared Servers PortsProcesses The Oracle8i JVM can load-balance over multiple listener processes
22
22 Load-balancing HTTP Server + Oracle8 i JVM ClientNetwork Load Balancer HTTP Servers Oracle8i Listeners Oracle8i Dispatchers Oracle8i Shared Servers PortsProcesses A listener will be chosen at random
23
23 Load-balancing HTTP Server + Oracle8 i JVM ClientNetwork Load Balancer HTTP Servers Oracle8i Listeners Oracle8i Dispatchers Oracle8i Shared Servers PortsProcesses The listener will determine which Oracle8i JVM node has the lightest load, and then which dispatcher on that node is most available
24
24 Load-balancing HTTP Server + Oracle8 i JVM ClientNetwork Load Balancer HTTP Servers Oracle8i Listeners Oracle8i Dispatchers Oracle8i Shared Servers PortsProcesses The dispatcher will then route the request to one of the server processes
25
25 Scaling Stateless Applications JDK JVM The JDK JVM scales by giving quick performance to many clients. This works well for stateless Java apps because the VM does not get weighted down by holding onto a lot of state. Client Apache JServ on JDK JVM HTTPServer Client Client Client No state Additional clients do not contribute additional state to be managed between successive requests
26
26 Application Design: Scalability JDK JVM However, stateful applications force the VM to perform a lot of concurrent memory management when multiple users access the system. Managing state may inhibit the scalability of the JDK JVM. Client Apache JServ on JDK JVM HTTPServer Client Client Client Managing this memory may slow down the performance of the JDK JVM
27
27 Application Design: Scalability Oracle8 i JVM The Oracle8 i JVM is a session-based JVM that handles stateful applications exceedingly well. Performance does not degrade until the capacity of the hardware is reached. Client Oracle8 i JVM HTTPServer Client Client Client No concurrent GC because of segregated memory spaces
28
28 Scaling Back-end Server Oracle 9i AS provides scalability for both stateless and stateful applications –Stateless Java applications scale well in the JDK JVM –Stateful Java applications scale well in the Oracle8 i JVM (aka JServer) Oracle 9i AS also provides a highly scalable infrastructure for: Oracle Forms, Oracle Reports, PL/SQL and Perl applications
29
29 Scaling Data Server: Oracle 9i AS Middle-tier database cache –Reduces load on back-end database –Faster access by avoiding network round trips –Works transparently with existing applications –Does not slow updates etc..
30
30 Scaling Data Server: Oracle 9i AS Example: Web site with catalog Without Cache: Static content served from middle tier. All catalog queries are resolved on back end. With Cache: Queries resolved at cache, reducing load on back end. Cache data on many middle tier nodes for higher Scalability. Static content Data reads Data writes HTTP Server Data writesData reads Static content Catalogdata HTTP ServerOracle8i Cache Catalogdata
31
31 Scaling Data Server: Database Cache Front-end servers Load Balancer Back-end servers Internet OPS Database iCache jserv OPS Database Partitioned Data-tier
32
32 Scalability: Putting it all together Stateless Front-end servers Load Balancer Back-end servers Internet OPS Database iCache jserv OPS Database Partitioned Data-tier Apache
33
33 Scalability: Putting it all together Stateful Front-end servers Load Balancer Back-end servers Internet OPS Database iCache OJVM OPS Database Partitioned Data-tier Apache OJVM
34
34 Oracle 9i AS Services for Scalability Oracle 9i AS enables scalable stateless and stateful applications, front-end servers, back- end servers and data servers Oracle 9i AS makes it easy to build scalable web applications
35
35 Agenda Goals for PAS Designing and Deploying Applications –Scalability –Availability
36
36 Availability Death-detection and restart Oracle 9i AS will detect the failure of given threads or processes and restart them as appropriate. –Watchdog in HTTP Server –PMON in Oracle8i JVM, Oracle8i PL/SQL, and Oracle8i Cache –HTTP Server will detect death of Apache JServ instance and not route requests to it. Restart of remote Apache JServ in a future release.
37
37 Availability Redundancy & Failover For web server failure, Oracle 9i AS web cache can reroute requests to other web server instances. For failure of stateless services, Oracle 9i AS will failover a request to an alternate instance of the service. This is similar to connection re-routing.
38
38 Oracle 9i AS: High Availability Oracle 9i AS can be deployed to create a system with no single point of failure HTTP Server Client Network load- balancer HTTP Server Apache JServ Oracle8i Oracle8i Cache HTTP Server Oracle8i No single point of failure in database tier with OPS Network load- balancer
39
39 Oracle 9i AS: Session Isolation There is no session isolation in a typical JDK JVM. The failure of one user’s session may cause all users’ sessions to fail. Client Apache JServ on JDK JVM HTTPServer Client Client Client One client may encounter a buggy session BUG
40
40 Oracle 9i AS: Session Isolation There is no session isolation in a typical JDK JVM. The failure of one user’s session may cause all users’ sessions to fail. Client Apache JServ on JDK JVM HTTPServer Client Client Client The one bug could bring down all users’ sessions
41
41 Oracle 9i AS: Session Isolation JServer isolates sessions from one another. In the case that one fails, the others are unaffected. Client Oracle8 i JVM HTTPServer Client Client Client One client may encounter a buggy session BUG
42
42 Oracle 9i AS: Session Isolation JServer isolates sessions from one another. In the case that one fails, the others are unaffected. Client Oracle8 i JVM HTTPServer Client Client Client Only the buggy session is lost. Other sessions are unaffected
43
43 In the case of failure of a stateless service of Oracle 9i AS, requests can be re-routed to alternate instances of the service. If a client is accessing a stateful application, the client may be re-routed to the instance of the application through an alternate route Let’s look at an example with the HTTP Server and a stateful application running in Oracle8 i JVM... Oracle 9i AS: Connection Re-routing
44
44 Oracle 9i AS: Connection Re-routing Example: Failure of an HTTP Server node. Subsequent requests can be re-routed through alternate nodes. HTTP Server on Node A Client Network load- balancer HTTP Server on Node B Oracle8 i JVM
45
45 Oracle 9i AS: Connection Re-routing Example: Failure of an HTTP Server node. Subsequent requests can be re-routed through alternate nodes. HTTP Server on Node A Client Network load- balancer HTTP Server on Node B Oracle8 i JVM A client request comes in and is routed to an HTTP Server instance and an Oracle8i JVM instance
46
46 Oracle 9i AS: Connection Re-routing HTTP Server on Node A Client Network load- balancer HTTP Server on Node B Oracle8 i JVM The application in Oracle8 i JVM is stateful, and session state is retained in the instance. Also, a cookie may be returned to the client’s browser Example: Failure of an HTTP Server node. Subsequent requests can be re-routed through alternate nodes.
47
47 Oracle 9i AS: Connection Re-routing Example: Failure of an HTTP Server node. Subsequent requests can be re-routed through alternate nodes. HTTP Server on Node A Client Network load- balancer HTTP Server on Node B Oracle8 i JVM Now, in between requests, the HTTP Server on Node A goes down
48
48 Oracle 9i AS: Connection Re-routing HTTP Server on Node A Client Network load- balancer HTTP Server on Node B Oracle8 i JVM The next request can be routed to the destination Oracle8 i JVM instance through an alternate HTTP Server Example: Failure of an HTTP Server node. Subsequent requests can be re-routed through alternate nodes.
49
49 Oracle 9i AS: Connection Re-routing HTTP Server on Node A Client Network load- balancer HTTP Server on Node B Oracle8 i JVM If it were just an HTTP Server process that went down, Oracle 9i AS would detect this and restart it Example: Failure of an HTTP Server node. Subsequent requests can be re-routed through alternate nodes.
50
50 Oracle 9i AS: Failover Oracle8 i Cache features transparent application failover (TAF). In the case that a cache node goes down, client sessions will be automatically recreated on an alternate instance. Client HTTP Server OJVM Oracle8i Cache A client has a stateful session with a cache instance
51
51 Oracle 9i AS: Failover Oracle8 i Cache features transparent application failover (TAF). In the case that a cache node goes down, client sessions will be automatically recreated on an alternate instance. Client HTTP Server OJVM Oracle8i Cache The cache instance may go down
52
52 Oracle 9i AS: Failover Oracle8 i Cache features transparent application failover (TAF). In the case that a cache node goes down, client sessions will be automatically recreated on an alternate instance. Client HTTP Server OJVM Oracle8i Cache The session automatically re-connects to the new instance. The cache session is transparently recreated on the alternate instance
53
53 Availability Minimize planned downtime No Single Point of Failure Session Isolation Automatic Death Detection And Restart Redundancy and Automatic Failover Oracle 9i AS makes it easy to build highly available web applications
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.