Login Redirection
Tags:
Login Redirection feature in SAP IQ 16 allows load balancing by redirecting login connecting to overloaded node to less node in the same logical server. Login Redirection can be controlled by using login server policy options:
- LOGIN_REDIRECTION
- REDIRECTION_WAITERS_THRESHOLD
For information related to these options see:
Steps to setup Login Redirection:
In my setup, I have iq1602c, iq1602q1, iq1602q2, and iq1602q1 and iq1602q2 are members of logical server ls1
[sybase@myhost]$ dbisql -c 'dsn= iq1602c' -nogui
(DBA)> CREATE LOGICAL SERVER ls1 MEMBERSHIP (iq1602q1,iq1602q2);
Execution time: 0.062 seconds
(DBA)> alter ls policy root TEMP_DATA_IN_SHARED_TEMP=ON login_redirection = On dqp_enabled = 1 redirection_waiters_threshold = 5
Execution time: 0.106 seconds
[sybase@myhost]$ dbisql -c 'dsn= iq1602c' -nogui
(DBA)> alter login policy root add logical server ls1
Execution time: 0.059 seconds
we have iq1602q1 and iq1602q2 in logical server ls1. Now if we connect to Coordinator iq1602c, login will be redirected to either iq1602q1
or iq1602q2.
dbisql -c 'uid=DBA;pwd=sql;eng= iq1602c;LS=ls1;NODETYPE=WRITER' -nogui
(DBA)> select @@servername
@@servername
--------------------------------------------------------------------------------
iq1602q1
(1 rows)
Execution time: 0.043 seconds
Now for testing shutdown iq1602q1, connection will be redirected to iq1602q2
dbisql -c 'uid=DBA;pwd=sql;eng= iq1602c;LS=ls1;NODETYPE=WRITER' -nogui
(DBA)> select @@servername
@@servername
--------------------------------------------------------------------------------
iq1602q2
if connection redirection is enabled and login/connection will redirect connections when:
- If the connection is being made to a server which is not member of thespecified logical server
- If there are more waiters at the gate than the specified threshold of waiters in the -iqgovern queue.
- If the specified node type does have role different than that requested.