Author Topic: Rewrite limitations  (Read 11558 times)

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 389
  • Karma: 22
Rewrite limitations
« on: April 18, 2008, 10:54:20 AM »
I have been testing the following:

For a DELETE_ALL Action:
Content Lenght less than 8000
Number of Ocurences less than 99
For a REPLACE_ALL Action:
Content Lenght unlimited
Maximum ocurrences less than 7971

Am I right?

Oracle can you help me find out the limitations, we are facing a point that we want to rewrite a site that is on a production enviroment.

If this site has a very high traffic can the rewrite be a good idea? I have consulted some of Citrix Consultors and they all are against using rewrite since is not fully supported.

Thanks

Daniel

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 389
  • Karma: 22
Re: Rewrite limitations
« Reply #1 on: April 18, 2008, 11:01:47 AM »
BTW I found this during my test run:
Message from syslogd@172.31.253.2 at Fri Apr 18 11:47:29 2008 ...
<local0.emerg> 172.31.253.2 04/18/2008:16:47:29 GMT ns : EVENT FREEDUPMEM :  FreeMemory freedAgain - addr 54f92000 - size 128

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 152
  • Karma: 18
Re: Rewrite limitations
« Reply #2 on: April 21, 2008, 11:49:34 AM »
Can you post what rules you were using? 

The Oracle

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 389
  • Karma: 22
Re: Rewrite limitations
« Reply #3 on: April 21, 2008, 01:17:36 PM »
sure, here are all the actions I used, the policy is true and it was binded to the vserver.

add rewrite action remove_http_https replace_all http.RES.BODY(1000000).SET_TEXT_MODE(ignorecase) "\"//\"" -pattern re~https://~
add rewrite action remove_http_https_4 delete_all http.RES.BODY(1000000).SET_TEXT_MODE(ignorecase) -pattern re!http://www.accessteam.net!
add rewrite action remove_http_https_villas delete_all http.RES.BODY(1000000).SET_TEXT_MODE(ignorecase) -pattern re!http://www.avvillas.com.co!
add rewrite action remove_http_https_para_2 delete_all http.RES.BODY(1000000).SET_TEXT_MODE(ignorecase) -pattern re!2!
add rewrite action test_remove_all replace_all http.RES.BODY(1000000).SET_TEXT_MODE(ignorecase) "\"3\"" -pattern re!1!
add rewrite action test_remove_all_ig replace_all http.RES.BODY(1000000) "\"3\"" -pattern re!1!
add rewrite action test_rreplace_all_villas replace_all http.RES.BODY(1000000) "\"GIFF\"" -pattern re!gif!
add rewrite action replace_http_https replace_all http.RES.BODY(1000000).SET_TEXT_MODE(ignorecase) "\"//\"" -pattern re!http:/
/!
add rewrite action delete_all_http_https replace_all http.RES.BODY(1000000).SET_TEXT_MODE(ignorecase) "\"//\"" -pattern re!htt
p://www.avvillas.com.co!

The followiong I am not sure why they did not work...

add rewrite action remove_http_https_para_css delete_all http.RES.BODY(1000000).SET_TEXT_MODE(ignorecase) -pattern "re!<LINK R
EL=STYLESHEET TYPE=[\"]text[/]css[\"] HREF=[\"]http://www[.]avvillas[.]com[.]co/pls/portal30/PORTAL30[.]wwv_display[.]css[?]p_
style_id=1[&]p_style_siteid=458[\"]>!"
add rewrite action delete_all_http_https_def replace_all http.RES.BODY(1000000).SET_TEXT_MODE(ignorecase) "\"//\"" -pattern re
!http://www[.]avvillas[.]com[.]co!

I can post the php code used to generete the test pages.

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 152
  • Karma: 18
Re: Rewrite limitations
« Reply #4 on: April 22, 2008, 07:50:52 PM »
Ok, some details... The limitations are:
a) not a strict limit--depending on the test and memory usage you may get different results
b) based not explicitly on the function being performed, but based on the memory used for the test
c) is necessary to insure the overall function of the device

In effect, the NS queues up changes that need to be made to the content as as passes through the NS, and executes all changes at one time (after the policies have been evaluated).  As such, each change will incur a memory penalty, and while you may have only 1M of data queued, it could incur several times that in overhead if you attempt to change every byte as an individual change.  On the other hand, as long as rewrite policies are fairly infrequent and used to "patch up" problems with an application, this is a very efficient means of handling traffic rewriting.  What the NS system is trying to do is prevent DoS attacks, yet be efficient in the functions it does, although this can cause some complications when you attempt to do a large number of rewrites, etc.

The Oracle

Offline evildani

  • Administrator
  • Hero Member
  • *****
  • Posts: 389
  • Karma: 22
Re: Rewrite limitations
« Reply #5 on: April 23, 2008, 07:59:51 AM »
My senior Consultor is very reluctant to use rewrite in production enviroments, we have had reboots using rewrite in the past...

We found a article in metalink (Oracle Support site) that confirms that a 9ias implementation of Oracle Portal will have absolute link no matter how you build the site, it is a bug fixed in future release... 10g...

Later

Offline TheOracle

  • Hero Member
  • *****
  • Posts: 152
  • Karma: 18
Re: Rewrite limitations
« Reply #6 on: April 23, 2008, 12:06:22 PM »
Anytime you have a reboot, submit the core file on a ticket.  With 8.1, I've only encountered on reboot situation, and it was with a pretty whacky configuration anyway, but I was able to submit the core and get it fixed.

The Oracle