How to set the SAS® OnDemand Decision Engine local locking for best performance in SAS® Fraud Management


This SAS KB article provides guidance about whether to enable SAS OnDemand Decision Engine local locking, including performance considerations, configuration impacts, and validation procedures.

This article contains the following sections:

Table of Contents


Overview

The local lock setting in SAS OnDemand Decision Engine determines how it handles locking for multiple transactions that are sent to SAS OnDemand Decision Engine at the same time with the same entity key. The SAS OnDemand Decision Engine local locking setting can significantly impact performance, especially in high-velocity low-cardinality (HVLC) transaction environments. 

Occasional bursts of a few transactions at a time with the same entity key are not uncommon, but as the frequency and number of same-time-same-entity-key transactions increases, the more likely the performance is to degrade. The systems have to process one same-entity-key transaction at a time, lock for the key that is processing, and hold back the rest. As a result, at some point, slower responses and lower capacity of transactions per second (tps) occur.

Note that some transactions might time out when they do not return decisions fast enough to the host systems. This issue can be worse when SLAs are very fast (for example, 40ms.) You might mitigate this issue by allowing longer SLA times (for example, 1,000ms). This behavior can be similar whether you enable SAS OnDemand Decision Engine local locking, or you do not enable SAS OnDemand Decision Engine local locking—which lets the database do all the lock management. 

In the end, the question is whether SAS OnDemand Decision Engine local locking is more efficient and faster than database locking. Historically, SAS Fraud Management out of the box (OOTB) defaulted to having local locking enabled. As entity and variable keys have grown in number and complexity, alongside database improvements, the newest SAS Fraud Management OOTB defaults to not having local locking enabled. When everything works okay, either setting behaves similarly. However, if you enabled local locking and experience SLA violations and timeouts, you might consider disabling SAS OnDemand Decision Engine local locking. 


Locate the Local Lock Setting

The local lock setting is located in each of your SAS OnDemand Decision Engine servers’ ose.properties files.

Here is an example from a test server:

/<SASConfig>/Lev1/Applications/SASFraudManagement/<SFM Version>/<Auth Domain>/engine/ServerN/etc/ose.properties 

LOCAL_LOCK_ENABLED = false


Local Locking - Enabled

Behavior

SAS OnDemand Decision Engine maintains its own lock list, ensuring that only one transaction per entity key is sent from that SAS OnDemand Decision Engine to the database at a time.

Pros 

Cons


Local Locking - Disabled

Behavior 

All transactions from SAS OnDemand Decision Engine are sent to the database immediately, allowing parallel processing from the SAS OnDemand Decision Engine perspective.

Pros

Cons


Performance Testing Recommendations

Note the following recommendations for performance testing:


Validation Procedure


Operational Integrity


Restart Requirements


Caveat

Mixing SAS OnDemand Decision Engines with different local locking settings can cause performance degradation. SAS OnDemand Decision Engines with local locking enabled will process transactions slower than those without whenever HVLC is present.

Here is an example scenario:

There are two SAS OnDemand Decision Engine servers with 100 engine threads each. The local lock is enabled for one SAS OnDemand Decision Engine and the local lock for the other SAS OnDemand Decision Engine is disabled. If a load balancer delivers 100 transactions for a card number one to each of the SAS OnDemand Decision Engine servers, the following occurs:

The database processes first-in first-out (FIFO), so the SAS OnDemand Decision Engine with local locking is at a disadvantage.

Mixing SAS OnDemand Decision Engines where the local locking is enabled with SAS OnDemand Decision Engines where the local locking is disabled might be helpful in some cases. For example, you can enable the local locking in only one SAS OnDemand Decision Engine that is dedicated to processing lower-priority transactions, which do not require a decision, and have a long SLA. This one SAS OnDemand Decision Engine will naturally be throttled down relative to other SAS OnDemand Decision Engines with local locking disabled to service higher priority transactions.


Conclusion

You should determine the local locking configuration by testing the performance tailored to your implementation. Consistency across nodes, collaboration with Database Administrators, and robust testing are keys to successful optimization.