Showing posts with label Oracle Webcache. Show all posts
Showing posts with label Oracle Webcache. Show all posts

Friday, September 26, 2008

How does webcache enhance security of a website?

All web applications should consider security to be an absolute priority.

A vital part of security is the use of firewalls.A firewall is, in effect, a router. It is a dual (or more) homed device that connects two (or more) networks. It accepts connection requests from addresses on one network interface and forwards them to addresses on another network interface. But whereas a standard router will forward all requests, a firewall will be configured with rules.

Using several layers of firewall and placing different servers behind the different firewalls can make hacking a web site virtually impossible.

Web Cache can significantly enhance that security of a web site. A possible scenario is illustrated below

The external firewall is configured to accept only one protocol on one port: HTTP, typically on port 80. It is further configured to route HTTP to only one port on one address, that of the Web Cache. Any other protocol, or any requests for any other addresses, will be rejected.

The Web Cache can be configured to forward requests only to the Apache web listeners,behind a second firewall. This firewall will be configured to accept requests from only one address and only one protocol: HTTPS from the Web Cache. It will route these requests only to the Apache web listeners in the next protected firewall zone on the appropriate port.

The third firewall can be configured to accept only requests from the Apache listeners’ addresses; furthermore, these requests would have to be using the AJP protocol, to invoke Java processes in the OC4J instances in the next protected zone, on whatever ports they
are monitoring.

Yet another firewall could transmit only Oracle Net requests to Oracle database servers, or LDAP requests to OID servers. Both the database and OID servers, which contain sensitive data rather than providing only processing capability, are thus protected by several layers of security.

The Web Cache is an integral part of the security structure and can indeed replace the first two firewalls.If the Web Cache is installed on a dual-homed device, it can be considered to be a router configured with rules that will allow it to monitor only one or two protocols (HTTP or HTTPS) on one network interface, and to forward them only to a nominated list of addresses (the Apache web listeners) on the other network interface.The Apache web listeners will themselves be configured to reject all traffic that does not come from the Web Cache.

How does Web Cache improves scalability of a website?

The Web Cache accelerates delivery of data to the users.
Apache’s Limitations
An Apache web listener is restricted in terms of the number of concurrent connections that it can service. The standard distribution can only handle 256 connections. The Apache distributed with Oracle Application Server can handle 1,024 concurrent Connections. The Web Cache can address the scalability limitations of Apache in two ways.

First, it can handle thousands of concurrent connections.
Second, it can distribute these connections across a pool of Apache web listeners.

Thus, the Web Cache can improve response times to end users and reduce the workload on the Apache web listener.

Webcache Architecture
The Web Cache is a specialized web listener.It monitors one or more ports on one or more addresses for incoming URLs.If it can satisfy the URL from its memory cache, it will do so; otherwise, it will pass the request back to a web listener.

There are certainly issues to consider with using a Web Cache, but provided that the rules it uses to determine which documents to cache and for how long are appropriate, it can improve the performance perceived by end users dramatically, reducing the strain on the application server(s) behind it.

By putting one, or several, Web Caches in front of your web site, you should be able to improve performance and reliability dramatically. For this reason, the Web Cache is enabled by default on all middle tier Oracle Application Server instances. It comes preconfigured with a set of caching rules that will certainly help all web sites; but if you choose to customize these rules to your own environment, the benefits will be even greater.

Tuesday, September 23, 2008

What is Oracle Webcache & how does it work?

Oracle AS webcache is a content-aware server accelerator or reverse proxy that improves the performance, scalability & availability of web sites that run on Oracle Application Server.
Oracle AS webcache stores frequently accessed URLs in the memory. Unlike legacy proxies that can handle only static objects, webcache caches static & dynamic generated content from one or more application web servers.

How does Reverse Proxy Web Caching Work?
  1. A browser sends a request to a Web site named www.company.com:80
  2. This request in turn generates a request to Domain Name System (DNS) for the IP address of the Web site
  3. DNS returns the IP address of the load balancer for the site, that is,144.25.190.240
  4. The browser sends the request for a Web page to the load balancer. In turn, the load balancer sends the request to OracleAS Web Cache server 144.25.190.241
  5. If the requested content is in its cache, then OracleAS Web Cache sends the content directly to the browser. This is called a cache hit
  6. If OracleAS Web Cache does not have the requested content or the content is stale or invalid, it hands the request off to application Web server 144.25.190.242.This is called a cache miss
  7. The application Web server sends the content to OracleAS Web Cache
  8. OracleAS Web Cache sends the content to the client and stores a copy of the page in cache

How to invalidate objects using Oracle Webcache?

Lets say we want to invalidate a portal page as follows http://mycompany.com:7778/pls/portal/url/page/mypagegroup/mypage

a) Access Webcache Admin http://server.domain.com:9400/webcacheadmin & login as ias_admin / ias_admin_password
b) Under the "Basic Invalidation" click "Enter  exact URL for removal" 
c) Enter the URL to be removed from the cache: /pls/portal/url/page/mypagegroup/mypage
d) Hit the submit button
e) If invalidation is successful, a window will appear with 

"Cache Cleanup Result
Invalidation Status: SUCCESS
Number of Objects Invalidated: 1"