ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:loadbalancer:enable_sticky_sessionsl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
v5:reference:loadbalancer:enable_sticky_sessionsl [2017/05/11 01:13] mnewnhamv5:reference:loadbalancer:enable_sticky_sessionsl [2017/05/11 01:14] (current) – [Description] mnewnham
Line 12: Line 12:
  
 The public class variable ''$enable_sticky_sessions'' pins the execution of commands to the last connection used. The default value for this is **true**. The public class variable ''$enable_sticky_sessions'' pins the execution of commands to the last connection used. The default value for this is **true**.
-The normal behavior of the load balancer is to re-use the first found connection, as the overhead of establishing a database connection is generally larger than that of running multiple simple queries against a single connectio.+The normal behavior of the load balancer is to re-use the first found connection, as the overhead of establishing a database connection is generally larger than that of running multiple simple queries against a single connection.
  
-The primary use-case for disabling this is if you are running a substantial number of heavy queries and they want to truly load balance at the per-query level rather than the per-request level. +The primary use-case for disabling this is if you are running a substantial number of heavy queries and want to truly load balance at the per-query level rather than the per-request level. 
  
 Since connecting to the database can take longer than running a few queries, it is less efficient to startup 5 connections to run 5 separate queries, when all 5 queries could be run on a single connection in less time. However if you need to run 1000 queries in a row (ie: batch job), it might be better to startup 5 connections and load balance all 1000 queries across those connections. Since connecting to the database can take longer than running a few queries, it is less efficient to startup 5 connections to run 5 separate queries, when all 5 queries could be run on a single connection in less time. However if you need to run 1000 queries in a row (ie: batch job), it might be better to startup 5 connections and load balance all 1000 queries across those connections.
v5/reference/loadbalancer/enable_sticky_sessionsl.1494458016.txt.gz · Last modified: 2017/05/11 01:13 by mnewnham