Performance Of OAG Scripting Language Filter (Doc ID 2100275.1)

Last updated on FEBRUARY 03, 2017

Applies to:

Oracle API Gateway - Version 11.1.2 and later
Information in this document applies to any platform.

Symptoms

PROBLEM DESCRIPTION
--------------------
Testing the performance of the Scripting Language filter showed that each call of the Scripting Language filter seems to be much slower than subsequent calls. For instance, a policy was created with a Scripting Language filter and the default JavaScript "function invoke(msg) { return true; }", and was invoked via SOAP UI.

The traffic monitor details show that this filter took 12ms for the first call and 4-5ms each on subsequent calls.
A Groovy script which retrieves the current date/time as a string using Java classes was also implemented- this Scripting Language filter took approximately 180ms for the first invocation and 0-1ms on subsequent calls.

The overall performance of the Scripting Language filter seems to be low and variable. Looking at some recent transactions in a QA environment, it was seen that the above Groovy script typically fluctuates anywhere between 0-15ms to retrieve the current date/time - many of these are in the middle of the night, where there should be no other load on the server.

ERROR
--------
No errors. Performance issue


ENVIRONMENT
------------
OAG 11.1.2.4 SP2
OS: Linux x86-64


STEPS
------
1) Create a policy with a Scripting Language filter, expose it as a path.
2) Invoke the path multiple times.
3) Observe that the first invocation takes longer and subsequent invocations are typically faster.
4) Observe that some subsequent invocations are still quite slow; especially with JavaScript language selected for the Scripting Language filter.




Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms