• Like
  • Save
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

FAQ on developing and deploying applications on MACH11 (Informix Dynamic Server v11)

  • 1,204 views
Published

MACH11 technology in IDS v11 brings unique opportunities to deploy applications in a scalable and continuously available system. Applications need to be aware of the isolation levels available, …

MACH11 technology in IDS v11 brings unique opportunities to deploy applications in a scalable and continuously available system. Applications need to be aware of the isolation levels available, transaction management, and deal with the failover situations effectively. This talk will focus on understanding the MACH11 environment, hooks for application to exploit. This talk will also cover APIs enhancements to exploit MACH11 technology.

Published in Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,204
On SlideShare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. FAQ and Answers for developing, deploying and maintaining applications in MACH11 environment. Keshava Murthy, Architect, IBM, [email_address]
  • 2. Example of MACH11 Configuration Primary SDS Blade Server B <Memphis> RSS RSS Traffic HDR Traffic SDS SDS Blade Server A <New Orleans> Building-A Disk Disk Blade Server C <Denver> Shared Disk Shared Disk Mirror Blade Server D <New Orleans> Building-B
  • 3. Example of MACH11 Configuration Primary SDS Blade Server B <Memphis> RSS RSS Traffic Connection Manager HDR Traffic SDS SDS SLA Blade Server A <New Orleans> Building-A Disk Disk Blade Server C <Denver> Shared Disk Shared Disk Mirror Blade Server D <New Orleans> Building-B
  • 4. Example of MACH11 Configuration Primary SDS Blade Server B <Memphis> RSS RSS Traffic Connection Manager DBA IDSAdmin IDSAdmin OLTP Apps Reporting Apps HDR Traffic SDS SDS SLA Blade Server A <New Orleans> Building-A HDR Secondary Disk Disk Blade Server C <Denver> Shared Disk Shared Disk Mirror Blade Server D <New Orleans> Building-B
  • 5.
    • H
    P S R Primary Server SDS: Shared Disk Secondary Server HDR secondary Server RSS: Remote Secondary Server U User/Application C Connection Manager Notations
  • 6. Example of MACH11 Configuration Blade Server B <Memphis> RSS RSS Traffic Connection Manager DBA IDSAdmin IDSAdmin OLTP Apps Reporting Apps HDR Traffic SLA P S S S S S H R R R Blade Server A <New Orleans> Building-A HDR Secondary Disk Disk Blade Server C <Denver> Shared Disk Shared Disk Mirror Blade Server D <New Orleans> Building-B
  • 7. What APIs can use MACH11? P H R R S S S C C C based Clients Java based Clients JDBC sqli drda drda sqli odbc-PHP-Ruby ESQL/C -4GL eGL .NET JDBC/PureQuery Hibernate/Data Services
  • 8. What APIs can use MACH11? P H R R S S S C C C based Clients Java based Clients JDBC sqli drda drda sqli App Servers and applications Websphere BEA JBoss
  • 9. What’s the motivation to move to MACH11?
    • High Availability
      • New options
      • Flexibility
    • Scale out
      • Analyze the load
      • Read-write ratios
  • 10. What do you get in Primary that you don’t in SDS or RSS?
    • Available only on the primary:
      • CREATE TABLE, CREATE INDEX and
      • most CREATE statements
      • UPDATE STATISTICS
      • TRUNCATE TABLE
      • ALTERS
      • XA Transactions
      • All isolation levels
      • Datablade Registration
    • Do the application setup using an SLA connecting ONLY to PRIMARY
    P S U H R
  • 11. What do you get in Primary that you don’t in SDS or RSS?
    • Available in SDS, RSS, HDR Secondary
      • Updates via secondary notes are available only
      • if you set UPDATABLE_SECONDARY in onconfig.
      • SELECT, INSERT, UPDATE, DELETE
      • EXECUTE FUNCTION, EXECUTE PROCEDURE
      • CREATE TEMP TABLE
      • SELECT… INTO TEMP
      • CREATE INDEX, TRUNCATE on TEMP table
      • Limited Isolation levels
        • DIRTY READ, COMMITTED READ, COMMITTED READ LAST COMMITTED
    P S U H R
  • 12. How do check which server I’m on?
    • The tables below in sysmasterhas information you can use to get environment information.
      • sysha_type
        • Is a single row table with current HA server type
        • and its PRIMARY’s name.
      • sysha_workload
      • sysha_lagtime
    • If MACH11 environment is setup, sysha database will be created.
      • Sysha database has complete configuration details
    P S U H R
  • 13. How do check which server I’m on?
    • Create function mysrvrtype() returns char(1)
    • Define x int;
    • Select ha_type into x from sysha:sysha_type;
    • If (ha_type = 0) then
    • return ‘N’;
    • Elif (ha_type = 1) then
    • return ‘P’;
    • Elif (ha_type = 2) then
    • return ‘H’;
    • Elif (ha_type = 3) then
    • return ‘S’;
    • Elif (ha_type = 4) then
    • return ‘R’;
    • ELSE
    • return ‘E’; -- error
    • End if;
    • End function;
    • Sysha_type.ha_primary stores the primary’s server name.
    • Syssmaster:syssqlhosts has the details on the primary server.
    P S U H R
  • 14. OK. I have MACH11. How do I failover my application?
    • Scenario 1. Simple configuration.
    P S U H
  • 15. OK. I have MACH11. How do I failover my application?
    • Scenario 1. Simple configuration.
    P S U H
  • 16. OK. I have MACH11. How do I failover my application?
    • Scenario 1. Simple configuration.
    P S U H P
    • Connection failover can be done in multiple ways, depending on the application.
  • 17. OK. I have MACH11. How do I failover my application? S
    • Typically error you get is -25582
    • Option 1: Informix drivers on SQLI protocol
      • Using DBPATH
      • ksh_lenexa onsoctcp flins soc_lenexa g=ordmgmt
      • ksh_chicago onsoctcp flins soc_chicago g=ordmgmt
      • ksh_dallas onsoctcp flins soc_dallas g=ordmgmt
      • Usually you set INFORMIXSERVER=ksh_lenexa to connect
      • You can set DBPATH=//ksh_chicago://ksh_dallas
      • Use Connect to mydb and don’t specify any server name.
      • Order of reconnection attempt will be, INFORMIXSERVER, servers in DBPATH.
    P U H P
  • 18. OK. I have MACH11. How do I failover my application? ordmgmt group S
    • Typically error you get is -25582
    • Option 2: Informix drivers on SQLI protocol
      • Connect to a group instead of a server
      • ordmgmt group - - i=2390
      • ksh_lenexa onsoctcp flins ksh_fc5 g=ordmgmt
      • ksh_chicago onsoctcp flins ksh_fc5s1 g=ordmgmt
      • ksh_dallas onsoctcp flins ksh_fc5s2 g=ordmgmt
      • Instead connect to mydb@ksh_lenexa do: connect to mydb@ordmgmt
      • Group names can be used in JDBC when you use sqlhosts
      • Connecting to a group will always connect to a PRIMARY server
      • To connect to a SDS, HDR Secondary or RSS node, connect to them directly.
      • If you have multiple SDS, RSS nodes, you can group them separately.
    P U H P
  • 19. OK. I have MACH11. How do I failover my application? ordmgmt S P U H P
    • Typically error you get is -25582
    • Option 3: Informix drivers on SQLI protocol
      • Use connection Manager
        • SETUP THE SLA (Service Level Agreement)
        • Simply connect to connection manager
          • Connect to rdb@ordconnmgr;
      • Connection manager is aware of the servers and will automatically redirect the connection – no programming required – to appropriate server.
    C
  • 20. What’s connection manager? S P H
    • Connection Manager is one of those know-it-all types
    • Applications first connect to connection manager
    C S R U SLA Application will first connect to connection manager
  • 21. What’s connection manager? S P H
    • Connection Manager is one of those know-it-all types
    • Applications first connect to connection manager
    C S R U SLA Connection is redirected to target server depending on the SLA
  • 22. What’s connection manager? S P H
    • Connection Manager is one of those know-it-all types
    • Applications first connect to connection manager
    C S R U SLA P Primary goes off-line. An SDS server will take over the Primary role
  • 23. What’s connection manager? S P H
    • Connection Manager is one of those know-it-all types
    • Applications first connect to connection manager
    C S R U SLA P Application/Driver will come back to connection manager to get a new connection
  • 24. What’s connection manager? S P H
    • Connection Manager is one of those know-it-all types
    • Applications first connect to connection manager
    C S R U SLA P Application will get the new connection to the new primary
  • 25. hmmm.. What’s SLA?
    • Service Level Agreement to set at
    • connection manager
    • Values: combinations of Primary, SDS, HDR, RSS, any server
    • SLA order=Primary+SDS
    • SLA Reports=RSS
    • SLA weekend=slowbox
    • order onsoctcp ordermc.my.com 13452
    • ordersds onsoctcp ordersds.my.com 13453
    • Reportrss onsoctcp reports.my.com 5728
    • slowbox onsoctcp oldbox.my.com 2848
    S P H C S R U SLA P
  • 26. Does DRDA work with connection Manager?
    • Yes
    • Connection manager can be used with
    • all IDS drivers. Both SQLI and DRDA drivers support it.
    • Simply use the connection manager ip and port on
    • any of the drivers.
    S P H C S R U SLA P
  • 27. Can the rerouting be automatic?
    • In APIs based on SQLI , the application layer
    • has to catch the connection exception and RETRY.
    • If using connection manager:
    • Retry the connection back to the connection manager
    • Connection manager will find the most appropriate server
    • based on SLA
    • Connection manager knows the latest status of each server
    • If not using connection manager:
    • Reconnecting to the group will connect to the PRIMARY server
    • DBPATH or a private list will simply get a new connection to an available server.
    S P H C S R U SLA P
  • 28. Can the rerouting be automatic?
    • Yes
    • DRDA drivers have a feature called
      • Automatic Client Rerouting
    • Supported in JDBC and .NET
      • IBM Data Server Driver for JDBC
      • IBM Data Server provider for .NET
    • Simply use connection managers’s host and port number
    • The driver, transparent to application, detects the connection failure and reconnects to the available server.
    • You can create list of alternate servers on JNDI
        • ds.setDriverType(4);
        • ds.setServerName(“srvr1.mydomain.com&quot;);
        • ds.setPortNumber(&quot;50002&quot;);
        • ds.setClientRerouteAlternateServerName(“srvr2.mydomain.com&quot;);
        • ds.setClientRerouteAlternatePortNumber(&quot;50000&quot;);
    S P H C S R U SLA P
  • 29. Can the rerouting be automatic?
    • // Create a starting context for naming operations
    • InitialContext registry = new InitialContext();
    • // Create a DB2ClientRerouteServerList object
    • DB2ClientRerouteServerList address = new DB2ClientRerouteServerList();
    • // Set the port number and server name for the main Configuration Manager
    • address.setPrimaryPortNumber(50002);
    • address.setPrimaryServerName(“srvr2.mydomain.com&quot;);
    • // Set the port number and server name for the alternative Configuration Manager
    • int[] port = {50000};
    • String[] server = {“srvr1.mydomain.com&quot;};
    • address.setAlternatePortNumber(port);
    • address.setAlternateServerName(server);
    • registry.rebind(&quot;serverList&quot;, address);
    • // Assign the JNDI name of the DB2ClientRerouteServerList object to the
    • // clientRerouteServerListJNDIName property
    • datasource.setClientRerouteServerListJNDIName(&quot;serverList&quot;);
    • After the connection is reestablished, the driver throws a SQLException with error code -4498. Failure to reconnect will return -4499.
    • You’ll need to handle this exception and restart the current transction.
    • The open transaction at the server is automatically rolledback.
    S P H C S R U SLA P
  • 30. How can I deploy MACH11 for load balancing?
    • Connection Manager automatically
    • load balances at the connection level
    • CM knows the load on each of the servers and
    • redirects the connection to least loaded server within SLA
    • IBM Data Server driver for JDBC also has transaction level load balancing.
    • The driver and the server exchange the current load on all systems within the SLA
    • The load information is exchanged at connection time and every 8 seconds.
    • Driver assigns the connection for each transaction
    S P H C S R U SLA P
  • 31. How do I use transaction load balancing?
    • Set the proprerty enableSysplexWLB to true
    • Set maxTransportObjects – to maximum number of connections
    • Can be set in the driver or a custom datasource
    • property in Websphere.
    • Connection Manager automatically assigns the server/connection with least load to perform the transaction.
    S P H C S R U SLA P
  • 32.
    • Thank You
    • [email_address]