RSS
) secondary servers in a high availability environment.1 RSS Technology
RSS
( Remote Standalone Secondary server) is very similar to HDR
, especially in setup and behavior. It is a full copy of an instance, and it can help with load balancing.
When comparing the two, RSS
is different from HDR
in several distinct ways. For example:
- The communication protocol is fully duplexed to allow better communication over slower lines.
- There is no synchronous mode of running
RSS
servers (including checkpoints). - An
RSS
server cannot be promoted to a Primary. - There can be any number of
RSS
servers. - Index Page Logging must be enabled.
However, RSS
and HDR
technologies can work well together. Even though there can only be one HDR
Secondary at a time. it is quite easy to convert an RSS
server to a HDR
Secondary, and back again.
Prior to RSS
, when a log buffer was flushed to disk, a copy of that page was sent
to the HDR
log buffer and the ER buffer cache. Now, with RSS
, the Primary
server also checks to see if there are RSS
servers. If so, then a copy of that
buffer will be sent to the cache, which will be used to send the information to the
RSS
server. If the RSS
Send thread is sleeping, then the thread will be
awakened to send the information to the RSS
server. This concept is represented in the following figure.

2 Requirements
Version of the database servers
The versions of the primary and secondary database servers must be the same.
Configuring dbspaces and chunks
The number of dbspaces, the number of chunks, their sizes, and the pathnames and their offsets must be identical on the primary and secondary servers.
Configuration Parameters
The ONCONFIG parameters shown below must have the same value on the two database servers:
-
ROOTNAME
-
ROOTOFFSET
-
ROOTPATH
-
ROOTSIZE
-
PHYSDBS
-
PHYSFILE
-
LTAPEDEV
-
LTAPEBLK
-
LTAPESIZE
-
TAPEBLK
-
TAPESIZE
-
STACKSIZE
3 Setting up RSS
RSS
has a setup procedure that is similar to HDR
. The following sections step
through this process, where you just copy the chunks to another location. The
process is simplified because there are no archiving algorithms included.
On the Primary (Machine pdemodb):
- Set LOG_INDEX_BUILDS and ENABLE_SNAPSHOT_COPY to 1 in the onconfig.
Copy
# LOG_INDEX_BUILDS - Enable (1) or disable (0) index page logging. # Required for RSS. Optional for HDR and SDS. LOG_INDEX_BUILDS 1 ENABLE_SNAPSHOT_COPY 1
- Add entries to the $INFORMIXSQLHOSTS and /etc/services files for network connections.
-
/etc/hosts file:
Copy
192.168.56.101 pdemodb #Primary server 192.168.56.111 rdemodb #Secondary server
-
/etc/services file:
Copy
sqlexec 9088/tcp # IBM Informix SQL Interface sqlexec 9088/udp # IBM Informix SQL Interface
-
$ONCONFIG file:
Copy
DBSERVERNAME pdemodb DBSERVERALIASES ol_pdemodb HA_ALIAS ol_pdemodb
-
$INFORMIXSQLHOSTS file:
Copy
#Primary server pdemodb onipcshm on_pdemodb on_pdemodb ol_pdemodb onsoctcp pdemodb sqlexec #Secondary server ol_rdemodb onsoctcp rdemodb sqlexec
-
/etc/hosts file:
-
Modify the /etc/hosts.equiv or the .rhosts file for the informix user ID to enable trusted communication.
-
/etc/hosts.equiv file:
Copy
#Secondary server rdemodb
-
/etc/hosts.equiv file:
-
Takes the database server to offline mode and removes shared memory.
Copy
onmode -ky
- Copy the chunks files to the secondary machine.
Copy
scp /INFORMIXDEV/* rdemodb:/INFORMIXDEV/
-
Takes the database server to online mode.
Copy
oninit
-
Add instance ol_rdemodb as RS server
Copy
onmode -d add RSS ol_rdemodb
On the Secondary (Machine rdemodb):
- Add entries to the $INFORMIXSQLHOSTS and /etc/services files for network connections.
-
/etc/hosts file:
Copy
192.168.56.101 pdemodb #Primary server 192.168.56.111 rdemodb #Secondary server
-
/etc/services file:
Copy
sqlexec 9088/tcp # IBM Informix SQL Interface sqlexec 9088/udp # IBM Informix SQL Interface
-
$ONCONFIG file:
Copy
DBSERVERNAME rdemodb DBSERVERALIASES ol_rdemodb HA_ALIAS ol_rdemodb
-
$INFORMIXSQLHOSTS file:
Copy
#Secondary server rdemodb onipcshm on_rdemodb on_rdemodb ol_rdemodb onsoctcp rdemodb sqlexec #Primary server ol_pdemodb onsoctcp pdemodb sqlexec
-
/etc/hosts file:
-
Modify the /etc/hosts.equiv or the .rhosts file for the informix user ID to enable trusted communication.
-
/etc/hosts.equiv file:
Copy
#Primary server pdemodb
-
/etc/hosts.equiv file:
4 Verify that the RSS connection was successful
If the HDR
connection is configured correctly, SQL statements can be executed from one server against the other.
The following example can be done in both directions, from the primary to the secondary and from the secondary to the primary.
The following example is to do this from the primary server pdemodb.
dbaccess
After choosing a database (any) and choosing the "New" menu, the following query is performed:
Select * from NOMBRE_BD@DBSRVALIAS_MAQUINA_2:NOMBRE_TABLA;
For example:
Select * from sysmaster@ol_rdemodb:sysdatabases;
This must be done without errors. If an error occurs, it can be for one of the following reasons:
908: Attempt to connect to database server (ol_pdemodb, conerr=-25555, oserr=0) failed.
In $INFORMIXDIR/etc/sqlhosts an entry is missing to connect to the server.
956: Client host or user (informix@rdemodb) is not trusted by the server.
In /etc/hosts.equiv an entry is missing for trusted servers. This file indicates the aliases of cards defined in /etc/hosts for which access by that card is considered trusted.
5 Setting up RSS with ontape
The following sections show the steps for setting up RSS
with ontape.
On the Primary (Machine pdemodb):
- Set LOG_INDEX_BUILDS to 1 in the onconfig.
Copy
# LOG_INDEX_BUILDS - Enable (1) or disable (0) index page logging. # Required for RSS. Optional for HDR and SDS. LOG_INDEX_BUILDS 1
- Add entries to the $INFORMIXSQLHOSTS and /etc/services files for network connections.
-
/etc/hosts file:
Copy
192.168.56.101 pdemodb #Primary server 192.168.56.111 rdemodb #Secondary server
-
/etc/services file:
Copy
sqlexec 9088/tcp # IBM Informix SQL Interface sqlexec 9088/udp # IBM Informix SQL Interface
-
$ONCONFIG file:
Copy
DBSERVERNAME pdemodb DBSERVERALIASES ol_pdemodb HA_ALIAS ol_pdemodb
-
$INFORMIXSQLHOSTS file:
Copy
#Primary server pdemodb onipcshm on_pdemodb on_pdemodb ol_pdemodb onsoctcp pdemodb sqlexec #Secondary server ol_rdemodb onsoctcp rdemodb sqlexec
-
/etc/hosts file:
-
Modify the /etc/hosts.equiv or the .rhosts file for the informix user ID to enable trusted communication.
-
/etc/hosts.equiv file:
Copy
#Secondary server rdemodb
-
/etc/hosts.equiv file:
-
Make sure the databases to be replicated are in logged mode.
Copy$ dbaccess sysmaster - - Database selected. > select * from sysdatabases where is_logging = 0; No rows found.
-
Run a backup level 0 and copy the generated file to the secondary machine.
Copyontape -s -L 0
Copyscp /home/informix/IFMX-ONTAPES/pdemodb_0_L0 rdemodb:/home/informix/IFMX-ONTAPES/
-
Add instance ol_rdemodb as RS server
Copy
onmode -d add RSS ol_rdemodb
On the Secondary (Machine rdemodb):
- Add entries to the $INFORMIXSQLHOSTS and /etc/services files for network connections.
-
/etc/hosts file:
Copy
192.168.56.101 pdemodb #Primary server 192.168.56.111 rdemodb #Secondary server
-
/etc/services file:
Copy
sqlexec 9088/tcp # IBM Informix SQL Interface sqlexec 9088/udp # IBM Informix SQL Interface
-
$ONCONFIG file:
Copy
DBSERVERNAME rdemodb DBSERVERALIASES ol_rdemodb HA_ALIAS ol_rdemodb
-
$INFORMIXSQLHOSTS file:
Copy
#Secondary server rdemodb onipcshm on_rdemodb on_rdemodb ol_rdemodb onsoctcp rdemodb sqlexec #Primary server ol_pdemodb onsoctcp pdemodb sqlexec
-
/etc/hosts file:
-
Modify the /etc/hosts.equiv or the .rhosts file for the informix user ID to enable trusted communication.
-
/etc/hosts.equiv file:
Copy
#Primary server pdemodb
-
/etc/hosts.equiv file:
- Make sure that all chunk paths are created, have the correct permissions, and ensure there is enough space on the disks for the data to reside.
-
Run an physical restore.
Copyontape -p -t /home/informix/IFMX-ONTAPES/pdemodb_0_L0
. . . Chunks chk/dbs offset size free bpages flags pathname 1 1 0 150000 125174 PO--- /INFORMIXDEV/rootdbs 2 2 0 50000 24947 PO--E /INFORMIXDEV/d_plog 3 3 0 30250 197 PO--- /INFORMIXDEV/d_llog 4 4 0 50000 2522 POS-- /INFORMIXDEV/s_sbsys . . . Continue restore? (y/n) y Do you want to back up the logs? (y/n) n Restore a level 1 archive (y/n) n
-
Sets an RS secondary server type
Copy
onmode -d RSS ol_pdemodb
6 Changing modes (promote)
From RSS to HDR Secondary:
The RSS
server can be converted into the HDR
Secondary server by issuing following command:
onmode -d secondary ol_pdemodb
From HDR Secondary to RSS:
Using following commands to change the HDR
secondary server into an RSS
server:
1. Register the RSS
server name with the HDR
primary server:
onmode -d add RSS ol_rdemodb
2. On the HDR
secondary, run the following command to change it to an RSS
server:
onmode -d RSS ol_pdemodb [optional password]
From RSS to Standard:
The RSS
server should be converted to a standard server by issuing the following command:
onmode -d standard
This step will make it a stand-alone server, and it will no longer be part of a cluster. To include RSS
back in the high availability cluster, perform the following:
- Restore the level-0 archive of the Primary server.
- Add the
RSS
server information at the Primary. - Issue the onmode command to set up the
RSS
server.
7 Monitoring and troubleshooting RSS
There are three main ways to look at RSS
:
- The onstat command
- The sysmaster database
- Event alarms
7.1 onstat -g rss
The onstat -g rss command can be run on the Primary and any RSS
server.
Shows a sample run on a Primary.
onstat -g rss
IBM Informix Dynamic Server Version 12.10.FC7ADE -- On-Line -- Up 04:04:58 -- 442536 Kbytes
Local server type: Primary
Index page logging status: Enabled
Index page logging was enabled at: 2017/08/01 10:19:00
Number of RSS servers: 1
RSS Server information:
RSS Srv RSS Srv Connection Next LPG to send Supports
name status status (log id,page) Proxy Writes
ol_rdemodb Active Connected 971,1877 N
Shows a sample run on an RSS
server.
onstat -g rss
IBM Informix Dynamic Server Version 12.10.FC7ADE -- Read-Only (RSS) -- Up 00:21:55 -- 442536 Kbytes
Local server type: RSS
Server Status : Active
Source server name: ol_pdemodb
Connection status: Connected
Last log page received(log id,page): 971,1874
7.2 onstat -g rss verbose
It is possible to get even more information from onstat with the onstat -g rss verbose option.
Shows a sample run on a Primary.
onstat -g rss verbose
IBM Informix Dynamic Server Version 12.10.FC7ADE -- On-Line -- Up 04:13:01 -- 442536 Kbytes
Local server type: Primary
Index page logging status: Enabled
Index page logging was enabled at: 2017/08/01 10:19:00
Number of RSS servers: 1
RSS Server information:
RSS Server control block: 0x46c23170
RSS server name: ol_rdemodb
RSS server status: Active
RSS connection status: Connected
RSS flow control:384/352
Log transmission status: Active
Next log page to send(log id,page): 971,1877
Last log page acked(log id,page): 971,1876
Last log page applied(log id,page): 971,1876
Time of Last Acknowledgement: 2017-08-24.08:24:39
Pending Log Pages to be ACKed: 0
Approximate Log Page Backlog:0
Sequence number of next buffer to send: 66
Sequence number of last buffer acked: 65
Supports Proxy Writes: N
The verbose output will print this detailed information for all RSS
server. As an alternative, use the onstat -g rss <name rss server> command to get detailed information for just one rss server.
Shows a sample run of this command asking for more details on a single RSS
server.
onstat -g rss ol_rdemodb
IBM Informix Dynamic Server Version 12.10.FC7ADE -- On-Line -- Up 04:27:42 -- 442536 Kbytes
RSS Server control block: 0x46c23170
RSS server name: ol_rdemodb
RSS server status: Active
RSS connection status: Connected
RSS flow control:384/352
Log transmission status: Active
Next log page to send(log id,page): 971,2407
Last log page acked(log id,page): 971,2406
Last log page applied(log id,page): 971,2406
Time of Last Acknowledgement: 2017-08-24.08:39:40
Pending Log Pages to be ACKed: 0
Approximate Log Page Backlog:0
Sequence number of next buffer to send: 144
Sequence number of last buffer acked: 143
Supports Proxy Writes: N
Log Pages Snooped:
RSS Srv From From Tossed
name Cache Disk (LBC full)
ol_rdemodb 539 1868 0
7.3 onstat -g smx
The onstat -g smx command prints server multiplexer group information for servers using SMX. For each server it will show such information as:
- The INFORMIXSERVER name
- The address in shared memory of the SMX pipe
- The encryption status
- The number of bytes sent and received
- The number of buffers sent and received
- The number of write and read calls
- The number of retries
Shows a sample run of this command.
onstat -g smx
IBM Informix Dynamic Server Version 12.10.FC7ADE -- On-Line -- Up 05:05:35 -- 442536 Kbytes
SMX connection statistics:
SMX control block: 0x45b22d28
Peer server name: ol_rdemodb
SMX connection address: 0x45b24328
Encryption status: Disabled
Total bytes sent: 5068236
Total bytes received: 134716
Total buffers sent: 2439
Total buffers received: 4737
Total write calls: 1716
Total read calls: 4737
Total retries for write call: 443
Data compression level: 0
Data sent: compressed 5068236 bytes by 0%
Data received: compressed 134716 bytes by 0%
7.4 onstat -g smx ses
The onstat -g smx ses command will first print out the address in shared memory for the SMX control block. Then it will print a line for every server with the following information:
- The INFORMIXSERVER.
- The address in shared memory of the SMX session.
- The type of connection. For
RSS
servers, this will typically say "RSS
Send." - The number of reads and writes.
Shows a sample run of this command.
onstat -g smx ses
IBM Informix Dynamic Server Version 12.10.FC7ADE -- On-Line -- Up 05:20:44 -- 442536 Kbytes
SMX session statistics:
SMX control block: 0x45b22d28
Peer SMX session client reads writes
name address type
ol_rdemodb 46a90050 RSS Send 2715 2606
7.5 The sysmaster database
Alternatively, the sysmaster database can be used to retrieve this information.
syssmx
The syssmx table contains information about the SMX session. An SMX session is simply the handling of communications with the other servers connected in either RSS
or SDS environments.
The following table shows the meaning of each column in the table.
Column | Meaning |
---|---|
address | The address in shared memory of the smx pipe for that connection |
name | The name of the connection |
encryption_status | Whether encryption is turned on or not |
buffers_sent | The number of buffers sent across the smx layer |
buffers_recv | The number of buffers received across the smx layer |
bytes_sent | The number of bytes sent across the smx layer |
bytes_recv | The number of bytes received across the smx layer |
retries | The number of retries for write calls |
Show a sample output query from the table:
$ dbaccess sysmaster - - Database selected. > SELECT * FROM syssmx; address 1169310504 name ol_rdemodb encryption_status Disabled buffers_sent 2880 buffers_recv 6409 bytes_sent 5219344 bytes_recv 182788 reads 6409 writes 2137 retries 443 1 row(s) retrieved. >
7.6 Event alarms
The database administrator can also monitor the event alarms that are triggered for the RSS
servers. When each event alarm is triggered, the Primary server writes a message to the message log that includes RSS
server name. There are several situations when the Primary server triggers event alarms for RSS
.
These are the most important alarms that need to be monitored:
-
RSS
log replay position is falling too far behind theRSS
source.This message displays when the log replay position for the
RSS
server is falling too far behind the Primary. If this trend continues, the Primary might not have a logical log file available when theRSS
server requests it. -
RSS
server is not acknowledging log transmissions.If the Primary server does not get acknowledgement (ACK) back (after it reaches the limit of successful transmissions) due to a network issue, it will trigger this event alarm. The Primary server will not send any more logical log pages until an acknowledgement is received.
-
Error receiving a buffer from
RSS
server.The Primary server experienced an error receiving a message from the
RSS
server.
Info
The class ID used by these events is 40, and severity is ALRM_ATTENTION.
8 Exports in RSS servers