SlideShare uma empresa Scribd logo
1 de 32
- 1 -
FAQ and Answers for developing,
deploying and maintaining applications
in MACH11 environment.
Keshava Murthy,
Architect, IBM, rkeshav@us.ibm.com
- 2 -
International Informix Users Group.2009 IIUG Informix Conference 2
Example of MACH11 Configuration
Primary
SDS
Blade Server A
<New Orleans>
Building-A
Blade Server B
<Memphis>
Disk
Disk
RSS
Blade Server C
<Denver>
Shared
Disk
Shared
Disk
Mirror
Blade Server D
<New Orleans>
Building-B
RSSTraffic
HDRTraffic
SDS
SDS
- 3 -
International Informix Users Group.2009 IIUG Informix Conference 3
Example of MACH11 Configuration
Primary
SDS
Blade Server A
<New Orleans>
Building-A
Blade Server B
<Memphis>
Disk
Disk
RSS
Blade Server C
<Denver>
Shared
Disk
Shared
Disk
Mirror
Blade Server D
<New Orleans>
Building-B
RSSTraffic
Connection Manager
HDRTraffic
SDS
SDS
SLA
- 4 -
International Informix Users Group.2009 IIUG Informix Conference 4
Example of MACH11 Configuration
Primary
SDS
Blade Server A
<New Orleans>
Building-A
Blade Server B
<Memphis>
HDRSecondary
Disk
Disk
RSS
Blade Server C
<Denver>
Shared
Disk
Shared
Disk
Mirror
Blade Server D
<New Orleans>
Building-B
RSSTraffic
Connection Manager
DBA
IDSAdmin
IDSAdmin
OLTP Apps
Reporting Apps
HDRTraffic
SDS
SDS
SLA
- 5 -
International Informix Users Group.2009 IIUG Informix Conference 5
P
S
H
R
Primary Server
SDS: Shared Disk Secondary Server
HDR secondary Server
RSS: Remote Secondary Server
U User/Application
C Connection Manager
Notations
- 6 -
International Informix Users Group.2009 IIUG Informix Conference 6
Example of MACH11 Configuration
Blade Server A
<New Orleans>
Building-A
Blade Server B
<Memphis>
HDRSecondary
Disk
Disk
RSS
Blade Server C
<Denver>
Shared
Disk
Shared
Disk
Mirror
Blade Server D
<New Orleans>
Building-B
RSSTraffic
Connection Manager
DBA
IDSAdmin
IDSAdmin
OLTP Apps
Reporting Apps
HDRTraffic
SLA
P
S
S
S
S
S
H
R
R
R
- 7 -
International Informix Users Group.2009 IIUG Informix Conference 7
What APIs can use MACH11?
P
H
RR
S
S S
CC
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 -
International Informix Users Group.2009 IIUG Informix Conference 8
What APIs can use MACH11?
P
H
RR
S
S S
CC
C based
Clients
Java
based
Clients
JDBC
sqli
drda
drda
sqli
App Servers
and
applications
Websphere
BEA
JBoss
- 9 -
International Informix Users Group.2009 IIUG Informix Conference 9
What’s the motivation to move to MACH11?
• High Availability
 New options
 Flexibility
• Scale out
 Analyze the load
 Read-write ratios
- 10 -
International Informix Users Group.2009 IIUG Informix Conference 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 -
International Informix Users Group.2009 IIUG Informix Conference 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 -
International Informix Users Group.2009 IIUG Informix Conference 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 -
International Informix Users Group.2009 IIUG Informix Conference 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 -
International Informix Users Group.2009 IIUG Informix Conference 14
OK. I have MACH11. How do I failover my
application?
• Scenario 1. Simple configuration.
P
S
U
H
- 15 -
International Informix Users Group.2009 IIUG Informix Conference 15
OK. I have MACH11. How do I failover my
application?
• Scenario 1. Simple configuration.
P
S
U
H
- 16 -
International Informix Users Group.2009 IIUG Informix Conference 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 -
International Informix Users Group.2009 IIUG Informix Conference 17
S
P
U
H
P
OK. I have MACH11. How do I failover my
application?
• 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.
- 18 -
International Informix Users Group.2009 IIUG Informix Conference 18
ordmgmt
group
S
P
U
H
P
OK. I have MACH11. How do I failover my
application?
• 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.
- 19 -
International Informix Users Group.2009 IIUG Informix Conference 19
ordmgmt
S
P
U
H
P
OK. I have MACH11. How do I failover my
application?
• 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 -
International Informix Users Group.2009 IIUG Informix Conference 20
S
P
H
What’s connection manager?
• 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 -
International Informix Users Group.2009 IIUG Informix Conference 21
S
P
H
What’s connection manager?
• 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 -
International Informix Users Group.2009 IIUG Informix Conference 22
S
P
H
What’s connection manager?
• 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 -
International Informix Users Group.2009 IIUG Informix Conference 23
S
P
H
What’s connection manager?
• 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 -
International Informix Users Group.2009 IIUG Informix Conference 24
S
P
H
What’s connection manager?
• 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 -
International Informix Users Group.2009 IIUG Informix Conference 25
S
P
H
C
S
R
U
SL
A
Phmmm.. 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
- 26 -
International Informix Users Group.2009 IIUG Informix Conference 26
S
P
H
C
S
R
U
SLA
P
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.
- 27 -
International Informix Users Group.2009 IIUG Informix Conference 27
S
P
H
C
S
R
U
SLA
P
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.
- 28 -
International Informix Users Group.2009 IIUG Informix Conference 28
S
P
H
C
S
R
U
SL
A
P
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");
ds.setPortNumber("50002");
ds.setClientRerouteAlternateServerName(“srvr2.mydomain.com");
ds.setClientRerouteAlternatePortNumber("50000");
- 29 -
International Informix Users Group.2009 IIUG Informix Conference 29
S
P
H
C
S
R
U
SLA
P
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");
// Set the port number and server name for the alternative Configuration Manager
int[] port = {50000};
String[] server = {“srvr1.mydomain.com"};
address.setAlternatePortNumber(port);
address.setAlternateServerName(server);
registry.rebind("serverList", address);
// Assign the JNDI name of the DB2ClientRerouteServerList object to the
// clientRerouteServerListJNDIName property
datasource.setClientRerouteServerListJNDIName("serverList");
• 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.
- 30 -
International Informix Users Group.2009 IIUG Informix Conference 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 -
International Informix Users Group.2009 IIUG Informix Conference 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 -
International Informix Users Group.2009 IIUG Informix Conference 32
Thank You
rkeshav@us.ibm.com

Mais conteúdo relacionado

Mais procurados

Introduction to the IBM AS/400
Introduction to the IBM AS/400Introduction to the IBM AS/400
Introduction to the IBM AS/400
tvlooy
 
Storage strategy and tsm roadmap
Storage strategy and tsm roadmapStorage strategy and tsm roadmap
Storage strategy and tsm roadmap
IBM Danmark
 

Mais procurados (14)

Bringing Mainframe Security Information Into Your Splunk Security Operations ...
Bringing Mainframe Security Information Into Your Splunk Security Operations ...Bringing Mainframe Security Information Into Your Splunk Security Operations ...
Bringing Mainframe Security Information Into Your Splunk Security Operations ...
 
Effective admin and development in iib
Effective admin and development in iibEffective admin and development in iib
Effective admin and development in iib
 
Migrating from ibm to hpe
Migrating from ibm to hpeMigrating from ibm to hpe
Migrating from ibm to hpe
 
Introduction to the IBM AS/400
Introduction to the IBM AS/400Introduction to the IBM AS/400
Introduction to the IBM AS/400
 
Lift Your Legacy UNIX Applications & Databases into the Cloud
Lift Your Legacy UNIX Applications & Databases into the Cloud Lift Your Legacy UNIX Applications & Databases into the Cloud
Lift Your Legacy UNIX Applications & Databases into the Cloud
 
IMS05 IMS V14 8gb osam for haldb
IMS05   IMS V14 8gb osam for haldbIMS05   IMS V14 8gb osam for haldb
IMS05 IMS V14 8gb osam for haldb
 
MongoDB Linux Porting, Performance Measurements and and Scaling Advantage usi...
MongoDB Linux Porting, Performance Measurements and and Scaling Advantage usi...MongoDB Linux Porting, Performance Measurements and and Scaling Advantage usi...
MongoDB Linux Porting, Performance Measurements and and Scaling Advantage usi...
 
Storage strategy and tsm roadmap
Storage strategy and tsm roadmapStorage strategy and tsm roadmap
Storage strategy and tsm roadmap
 
Iib v10 performance problem determination examples
Iib v10 performance problem determination examplesIib v10 performance problem determination examples
Iib v10 performance problem determination examples
 
Trends and directions for application developers
Trends and directions for application developersTrends and directions for application developers
Trends and directions for application developers
 
Application trends db2 day 2015 jorn
Application trends   db2 day 2015 jornApplication trends   db2 day 2015 jorn
Application trends db2 day 2015 jorn
 
Mainframe cloud computing presentation
Mainframe cloud computing presentationMainframe cloud computing presentation
Mainframe cloud computing presentation
 
Informix 14.1 launch webinar
Informix 14.1 launch webinarInformix 14.1 launch webinar
Informix 14.1 launch webinar
 
Mainframe Fine Tuning - Fabio Massimo Ottaviani
Mainframe Fine Tuning - Fabio Massimo OttavianiMainframe Fine Tuning - Fabio Massimo Ottaviani
Mainframe Fine Tuning - Fabio Massimo Ottaviani
 

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

SoftLayer & Ingram Micro: A Winning Combination for Partners
SoftLayer & Ingram Micro: A Winning Combination for PartnersSoftLayer & Ingram Micro: A Winning Combination for Partners
SoftLayer & Ingram Micro: A Winning Combination for Partners
Ingram Micro Cloud
 
Introduction to ControlLogix Redundancy Customer Presentation.pptx
Introduction to ControlLogix Redundancy Customer Presentation.pptxIntroduction to ControlLogix Redundancy Customer Presentation.pptx
Introduction to ControlLogix Redundancy Customer Presentation.pptx
SyedMuhammadAliOmer
 

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

IBM i Development: Increase Accuracy and Efficiency with SEQUEL's ABSTRACT a...
 IBM i Development: Increase Accuracy and Efficiency with SEQUEL's ABSTRACT a... IBM i Development: Increase Accuracy and Efficiency with SEQUEL's ABSTRACT a...
IBM i Development: Increase Accuracy and Efficiency with SEQUEL's ABSTRACT a...
 
Informix HA Best Practices
Informix HA Best Practices Informix HA Best Practices
Informix HA Best Practices
 
Always on high availability best practices for informix
Always on high availability best practices for informixAlways on high availability best practices for informix
Always on high availability best practices for informix
 
Keeping Data in Sync with Syncsort
Keeping Data in Sync with SyncsortKeeping Data in Sync with Syncsort
Keeping Data in Sync with Syncsort
 
SoftLayer & Ingram Micro: A Winning Combination for Partners
SoftLayer & Ingram Micro: A Winning Combination for PartnersSoftLayer & Ingram Micro: A Winning Combination for Partners
SoftLayer & Ingram Micro: A Winning Combination for Partners
 
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond final
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond finalId101 what's new in ibm lotus® domino® 8.5.3 and beyond final
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond final
 
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
Automate Oracle database patches and upgrades using Fleet Provisioning and Pa...
 
HL7 Survival Guide - Chapter 10 – Process and Workflow
HL7 Survival Guide - Chapter 10 – Process and WorkflowHL7 Survival Guide - Chapter 10 – Process and Workflow
HL7 Survival Guide - Chapter 10 – Process and Workflow
 
Red Hat Enterprise Linux: The web performance leader
Red Hat Enterprise Linux: The web performance leaderRed Hat Enterprise Linux: The web performance leader
Red Hat Enterprise Linux: The web performance leader
 
Top Ten Tips for IBM i Security and Compliance
Top Ten Tips for IBM i Security and ComplianceTop Ten Tips for IBM i Security and Compliance
Top Ten Tips for IBM i Security and Compliance
 
Delivering Mission Critical Applications with Leostream and HP RGS
Delivering Mission Critical Applications with Leostream and HP RGSDelivering Mission Critical Applications with Leostream and HP RGS
Delivering Mission Critical Applications with Leostream and HP RGS
 
RA TechED 2019 - PR03 - Implementation of PlantPAx Systems
RA TechED 2019 - PR03 - Implementation of PlantPAx SystemsRA TechED 2019 - PR03 - Implementation of PlantPAx Systems
RA TechED 2019 - PR03 - Implementation of PlantPAx Systems
 
FIWARE Tech Summit - Stream Processing with Kurento Media Server
FIWARE Tech Summit - Stream Processing with Kurento Media ServerFIWARE Tech Summit - Stream Processing with Kurento Media Server
FIWARE Tech Summit - Stream Processing with Kurento Media Server
 
Nagios Conference 2013 - Luis Contreras - Nagios in Wind Telcom
Nagios Conference 2013 - Luis Contreras - Nagios in Wind TelcomNagios Conference 2013 - Luis Contreras - Nagios in Wind Telcom
Nagios Conference 2013 - Luis Contreras - Nagios in Wind Telcom
 
Cloud for Service Providers - A Winning Combination
Cloud for Service Providers - A Winning CombinationCloud for Service Providers - A Winning Combination
Cloud for Service Providers - A Winning Combination
 
Cloud for Service Providers - A Winning Combination
Cloud for Service Providers - A Winning CombinationCloud for Service Providers - A Winning Combination
Cloud for Service Providers - A Winning Combination
 
Comment déployer une stratégie microsoft en mode appliance
Comment déployer une stratégie microsoft en mode applianceComment déployer une stratégie microsoft en mode appliance
Comment déployer une stratégie microsoft en mode appliance
 
Introduction to ControlLogix Redundancy Customer Presentation.pptx
Introduction to ControlLogix Redundancy Customer Presentation.pptxIntroduction to ControlLogix Redundancy Customer Presentation.pptx
Introduction to ControlLogix Redundancy Customer Presentation.pptx
 
End-to-End, Source to Analytics, Data Lineage with Syncsort DMX-h
End-to-End, Source to Analytics, Data Lineage with Syncsort DMX-hEnd-to-End, Source to Analytics, Data Lineage with Syncsort DMX-h
End-to-End, Source to Analytics, Data Lineage with Syncsort DMX-h
 
Top 5 Reasons To Consider SolarWinds IPAM Over Infoblox
Top 5 Reasons To Consider SolarWinds IPAM Over InfobloxTop 5 Reasons To Consider SolarWinds IPAM Over Infoblox
Top 5 Reasons To Consider SolarWinds IPAM Over Infoblox
 

Mais de Keshav Murthy

Bringing SQL to NoSQL: Rich, Declarative Query for NoSQL
Bringing SQL to NoSQL: Rich, Declarative Query for NoSQLBringing SQL to NoSQL: Rich, Declarative Query for NoSQL
Bringing SQL to NoSQL: Rich, Declarative Query for NoSQL
Keshav Murthy
 

Mais de Keshav Murthy (20)

N1QL New Features in couchbase 7.0
N1QL New Features in couchbase 7.0N1QL New Features in couchbase 7.0
N1QL New Features in couchbase 7.0
 
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018Couchbase Tutorial: Big data Open Source Systems: VLDB2018
Couchbase Tutorial: Big data Open Source Systems: VLDB2018
 
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
N1QL+GSI: Language and Performance Improvements in Couchbase 5.0 and 5.5
 
XLDB Lightning Talk: Databases for an Engaged World: Requirements and Design...
XLDB Lightning Talk: Databases for an Engaged World: Requirements and Design...XLDB Lightning Talk: Databases for an Engaged World: Requirements and Design...
XLDB Lightning Talk: Databases for an Engaged World: Requirements and Design...
 
Couchbase 5.5: N1QL and Indexing features
Couchbase 5.5: N1QL and Indexing featuresCouchbase 5.5: N1QL and Indexing features
Couchbase 5.5: N1QL and Indexing features
 
N1QL: Query Optimizer Improvements in Couchbase 5.0. By, Sitaram Vemulapalli
N1QL: Query Optimizer Improvements in Couchbase 5.0. By, Sitaram VemulapalliN1QL: Query Optimizer Improvements in Couchbase 5.0. By, Sitaram Vemulapalli
N1QL: Query Optimizer Improvements in Couchbase 5.0. By, Sitaram Vemulapalli
 
Couchbase N1QL: Language & Architecture Overview.
Couchbase N1QL: Language & Architecture Overview.Couchbase N1QL: Language & Architecture Overview.
Couchbase N1QL: Language & Architecture Overview.
 
Couchbase Query Workbench Enhancements By Eben Haber
Couchbase Query Workbench Enhancements  By Eben Haber Couchbase Query Workbench Enhancements  By Eben Haber
Couchbase Query Workbench Enhancements By Eben Haber
 
Mindmap: Oracle to Couchbase for developers
Mindmap: Oracle to Couchbase for developersMindmap: Oracle to Couchbase for developers
Mindmap: Oracle to Couchbase for developers
 
Couchbase N1QL: Index Advisor
Couchbase N1QL: Index AdvisorCouchbase N1QL: Index Advisor
Couchbase N1QL: Index Advisor
 
N1QL: What's new in Couchbase 5.0
N1QL: What's new in Couchbase 5.0N1QL: What's new in Couchbase 5.0
N1QL: What's new in Couchbase 5.0
 
From SQL to NoSQL: Structured Querying for JSON
From SQL to NoSQL: Structured Querying for JSONFrom SQL to NoSQL: Structured Querying for JSON
From SQL to NoSQL: Structured Querying for JSON
 
Tuning for Performance: indexes & Queries
Tuning for Performance: indexes & QueriesTuning for Performance: indexes & Queries
Tuning for Performance: indexes & Queries
 
Understanding N1QL Optimizer to Tune Queries
Understanding N1QL Optimizer to Tune QueriesUnderstanding N1QL Optimizer to Tune Queries
Understanding N1QL Optimizer to Tune Queries
 
Utilizing Arrays: Modeling, Querying and Indexing
Utilizing Arrays: Modeling, Querying and IndexingUtilizing Arrays: Modeling, Querying and Indexing
Utilizing Arrays: Modeling, Querying and Indexing
 
Extended JOIN in Couchbase Server 4.5
Extended JOIN in Couchbase Server 4.5Extended JOIN in Couchbase Server 4.5
Extended JOIN in Couchbase Server 4.5
 
Bringing SQL to NoSQL: Rich, Declarative Query for NoSQL
Bringing SQL to NoSQL: Rich, Declarative Query for NoSQLBringing SQL to NoSQL: Rich, Declarative Query for NoSQL
Bringing SQL to NoSQL: Rich, Declarative Query for NoSQL
 
Query in Couchbase. N1QL: SQL for JSON
Query in Couchbase.  N1QL: SQL for JSONQuery in Couchbase.  N1QL: SQL for JSON
Query in Couchbase. N1QL: SQL for JSON
 
SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications 
SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications 
SQL for JSON: Rich, Declarative Querying for NoSQL Databases and Applications 
 
Introducing N1QL: New SQL Based Query Language for JSON
Introducing N1QL: New SQL Based Query Language for JSONIntroducing N1QL: New SQL Based Query Language for JSON
Introducing N1QL: New SQL Based Query Language for JSON
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 

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

  • 1. - 1 - FAQ and Answers for developing, deploying and maintaining applications in MACH11 environment. Keshava Murthy, Architect, IBM, rkeshav@us.ibm.com
  • 2. - 2 - International Informix Users Group.2009 IIUG Informix Conference 2 Example of MACH11 Configuration Primary SDS Blade Server A <New Orleans> Building-A Blade Server B <Memphis> Disk Disk RSS Blade Server C <Denver> Shared Disk Shared Disk Mirror Blade Server D <New Orleans> Building-B RSSTraffic HDRTraffic SDS SDS
  • 3. - 3 - International Informix Users Group.2009 IIUG Informix Conference 3 Example of MACH11 Configuration Primary SDS Blade Server A <New Orleans> Building-A Blade Server B <Memphis> Disk Disk RSS Blade Server C <Denver> Shared Disk Shared Disk Mirror Blade Server D <New Orleans> Building-B RSSTraffic Connection Manager HDRTraffic SDS SDS SLA
  • 4. - 4 - International Informix Users Group.2009 IIUG Informix Conference 4 Example of MACH11 Configuration Primary SDS Blade Server A <New Orleans> Building-A Blade Server B <Memphis> HDRSecondary Disk Disk RSS Blade Server C <Denver> Shared Disk Shared Disk Mirror Blade Server D <New Orleans> Building-B RSSTraffic Connection Manager DBA IDSAdmin IDSAdmin OLTP Apps Reporting Apps HDRTraffic SDS SDS SLA
  • 5. - 5 - International Informix Users Group.2009 IIUG Informix Conference 5 P S H R Primary Server SDS: Shared Disk Secondary Server HDR secondary Server RSS: Remote Secondary Server U User/Application C Connection Manager Notations
  • 6. - 6 - International Informix Users Group.2009 IIUG Informix Conference 6 Example of MACH11 Configuration Blade Server A <New Orleans> Building-A Blade Server B <Memphis> HDRSecondary Disk Disk RSS Blade Server C <Denver> Shared Disk Shared Disk Mirror Blade Server D <New Orleans> Building-B RSSTraffic Connection Manager DBA IDSAdmin IDSAdmin OLTP Apps Reporting Apps HDRTraffic SLA P S S S S S H R R R
  • 7. - 7 - International Informix Users Group.2009 IIUG Informix Conference 7 What APIs can use MACH11? P H RR S S S CC 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. - 8 - International Informix Users Group.2009 IIUG Informix Conference 8 What APIs can use MACH11? P H RR S S S CC C based Clients Java based Clients JDBC sqli drda drda sqli App Servers and applications Websphere BEA JBoss
  • 9. - 9 - International Informix Users Group.2009 IIUG Informix Conference 9 What’s the motivation to move to MACH11? • High Availability  New options  Flexibility • Scale out  Analyze the load  Read-write ratios
  • 10. - 10 - International Informix Users Group.2009 IIUG Informix Conference 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. - 11 - International Informix Users Group.2009 IIUG Informix Conference 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. - 12 - International Informix Users Group.2009 IIUG Informix Conference 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. - 13 - International Informix Users Group.2009 IIUG Informix Conference 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. - 14 - International Informix Users Group.2009 IIUG Informix Conference 14 OK. I have MACH11. How do I failover my application? • Scenario 1. Simple configuration. P S U H
  • 15. - 15 - International Informix Users Group.2009 IIUG Informix Conference 15 OK. I have MACH11. How do I failover my application? • Scenario 1. Simple configuration. P S U H
  • 16. - 16 - International Informix Users Group.2009 IIUG Informix Conference 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. - 17 - International Informix Users Group.2009 IIUG Informix Conference 17 S P U H P OK. I have MACH11. How do I failover my application? • 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.
  • 18. - 18 - International Informix Users Group.2009 IIUG Informix Conference 18 ordmgmt group S P U H P OK. I have MACH11. How do I failover my application? • 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.
  • 19. - 19 - International Informix Users Group.2009 IIUG Informix Conference 19 ordmgmt S P U H P OK. I have MACH11. How do I failover my application? • 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. - 20 - International Informix Users Group.2009 IIUG Informix Conference 20 S P H What’s connection manager? • 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. - 21 - International Informix Users Group.2009 IIUG Informix Conference 21 S P H What’s connection manager? • 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. - 22 - International Informix Users Group.2009 IIUG Informix Conference 22 S P H What’s connection manager? • 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. - 23 - International Informix Users Group.2009 IIUG Informix Conference 23 S P H What’s connection manager? • 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. - 24 - International Informix Users Group.2009 IIUG Informix Conference 24 S P H What’s connection manager? • 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. - 25 - International Informix Users Group.2009 IIUG Informix Conference 25 S P H C S R U SL A Phmmm.. 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
  • 26. - 26 - International Informix Users Group.2009 IIUG Informix Conference 26 S P H C S R U SLA P 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.
  • 27. - 27 - International Informix Users Group.2009 IIUG Informix Conference 27 S P H C S R U SLA P 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.
  • 28. - 28 - International Informix Users Group.2009 IIUG Informix Conference 28 S P H C S R U SL A P 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"); ds.setPortNumber("50002"); ds.setClientRerouteAlternateServerName(“srvr2.mydomain.com"); ds.setClientRerouteAlternatePortNumber("50000");
  • 29. - 29 - International Informix Users Group.2009 IIUG Informix Conference 29 S P H C S R U SLA P 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"); // Set the port number and server name for the alternative Configuration Manager int[] port = {50000}; String[] server = {“srvr1.mydomain.com"}; address.setAlternatePortNumber(port); address.setAlternateServerName(server); registry.rebind("serverList", address); // Assign the JNDI name of the DB2ClientRerouteServerList object to the // clientRerouteServerListJNDIName property datasource.setClientRerouteServerListJNDIName("serverList"); • 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.
  • 30. - 30 - International Informix Users Group.2009 IIUG Informix Conference 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. - 31 - International Informix Users Group.2009 IIUG Informix Conference 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. - 32 - International Informix Users Group.2009 IIUG Informix Conference 32 Thank You rkeshav@us.ibm.com