Reconfiguring the application
Up until now, whenever we needed to change the configuration of the application, we stopped the application, loaded the new configuration, and started it again. For a real application with hundreds of servers, this requires significant downtime.
In this section, we will replace two instances of the ping.py
server with five instances of the ping2.py
server. To make it more interesting, we will also create a new group for them because there are times when you also have to modify the group configuration. And finally, we will remove the old instances of these servers.
To change the configuration while the application is running, we have to call the .TMIB
service. In addition to changing the configuration, it can also start and stop Tuxedo servers by changing the value of TA_STATE
from INAtive
to ACTive
and back. Keep python3 load.py
running and watch how the application behaves.
First, we create a new group, called GROUP2
, and start it:
import...