Saturday, April 4, 2015

Performance Testing Message Architecture In A Secure Zone(Approach)
 BY:Khounish Dasgupta
Editorial Note:-Vote of Thanks : Before starting the article i would like to thanks all the viewers and who have read my article and sent me personal feedback and accolades etc. I feel like the night outs came out with flying colours. After receiving overwhelming responses and hits on my past articles ,I realized that my previous articles has been liked and utilized by technocrats ,business development team,development,Middleware through their work areas. That boosts me a lot to write the new article .Those who have not got a chance to read my previous articles can find them at below locations
  1. https://www.linkedin.com/pulse/performance-testingengineering-message-oriented-mom-khounish-dasgupta
  2. https://www.linkedin.com/pulse/performance-testingengineering-message-oriented-mom-khounish-dasgupta
  3. https://www.linkedin.com/pulse/performance-testing-message-oriented-middleware-part-3-dasgupta
  4. https://www.linkedin.com/pulse/performance-testing-message-oriented-middleware-part-4-dasgupta
  5. https://www.linkedin.com/pulse/performance-testing-message-oriented-middleware-part-5-dasgupta
  6. http://kshounish007.blogspot.com/

Well,In all above mentioned previous articles we have discussed about how to test a basic message oriented model through throttled conditions.
In current article, we would discuss about an event driven messaging Architecture through which a Non Secure Zone communicates through Secure Zone,Application within and out of Secure Zone,Publishers,Subscribers,routers,Firewalls,Databases,Queues
Lets take the architecture mentioned above(picture) and describe the salient points
  • Public Zone:On left side have designed public zone for user and applications to publish events/messages in public zone.
  • Private Zone:On right side have designed private zone which is accessible by private applications through secure private communications.
  • Public-Private Zone:There are situations when customer facing public application needs to access private zone to store sensitive customer profile data in private zone. This is achieved through making certain public zone appliances to communicate with private zone appliances.
Architecture Elaboration:
In above picture the whole End-to-End communication has been discussed through 1-8 sequence flows.
  1. Process 1:In above architecture process->1 is process of publishing message format by customer facing/Agent facing/back office/Admin etc.. applications publisher or background batch jobs publishing or automated applications etc.. Please note that some of the 1's are done in public queues and Some on private queues
  2. Process 2:In above architecture process->2 is process of consumption of messages/events by public zone consumers/listeners/subscribers which subscribe to the queues , process messages,responds back or passes it onto secure zone for further processing.
  3. Process 3:In above architecture process->3 communication process between consumers and routers , there are few messages public zone consumers likes to sends it to private zone consumers . Router roles plays good role to encapsulate and route the sensitive packets to private zone.
  4. Process 4: In above architecture process-4 is communication between router and firewall. Firewall plays a great role in encrypting or adding secure header bits before routing to proper secure zone.
  5. Process 5:In above architecture process-5 is process of firewall passing the packets to secure zone internal routers so that the packets can reach to proper secure destination
  6. Process 6:In above architecture process-6 is process router transmitting/publishing the secure,encapsulated,encrypted message packets to secure zone queue from where the consumers of secure zone can poll the messages and process it through.
  7. Process 7: In above architecture process-7 is process of consumption of secure messages ,decryption of message packets through synchronous or asynchronous mechanism and process it further.
  8. Process 8:In above architecture process-8 is process of subscriber/consumer consuming message and inserting/updating/retrieving various RDBMS that has been implemented in architecture
Hence Over all at end-to-end level the whole process can be summarized as below
Through public zone applications customer profile data,sensitive information like email addresses/credit card/order information/email address/phone number etc would be published to public queues. in addition to the same , batch process,automated processes,mobile /tablet communication data would also be published in queue public subscriber processes would subscribe the various types of messages and would process and pass on the sensitive information to private queues via router and firewall.Private consumers /subscriber would further consume the messages,store into secure databases for further usage.In addition to the same some private applications which are there in secure zone would also publish messages to the same queues and get combined to traffic. this is how public-private communication would get established .
                                 Business Asks How do we test this Architecture
This Can be tested through tested through below ways
END-to-End : All the Performance test types can be performed by driving the traffic through End-to-End Test in few ways.
  • Application Scripting:Thin client(Costly Path): As per this approach. A performance testing team has to engage there team members to script the thin UI client through daily used business case scenarios using any performance scripting tool record and replay functionality. To me , If i have to test the efficiency of the application ,i would take this path , but for testing message queue this could be costly path . because each application needs to be scripted and any small or big change can make a re- scripting effort spanning 5+ days

Queue Tapping Framework(Cost Effective Path): At End to End level this  path  could be very useful. In  one of my article i have mentioned   the approach for throttling based load. similar approach can be taken here. Alternatively ,The application traffic can be simulated at the message tier level  through various formats. formats are  generally schema based and thus  changes in schema can enable  performance scripting  person  to move ahead with little bit of  changes in the test driven code.   Below technique is called  "Divert and Steal then Fill At Will"( called by me though)
Component Level:   Here in the current Architecture  there are  two messaging components .  One is in  public zone and another one is in Private zone. both the zone are connection  through  router and firewall. So latency could be at application level or could be at network level too. So to determine  that delta value of the latency we must do below
  1. Perform performance test  on Subscriber capacity at Public Zone in atomic mode. calculate  the message processing power
  2. Perform performance test  capacity at Private  Zone in atomic mode. calculate  the message processing power
  3. Perform performance test  capacity by driving the test through Public   Zone and monitor the Public-Private zone message process capacity.  Based on stats of 1 and 2 , delta value will help in generating near to  accurate  message processing capacity report at end to end level too
                Note,  I  would only cover Approach to test 2. 1 and 3 can be taken for homework. 
How to test the Messaging architecture in secure zone. 
This can  be easily done by talking to middleware and opening firewall port. But certain time network policies are very strict in organizations..  they wont allow. Also there could  be situation that all the secure environment is based on Unix/Linux environment. If its windows its easy as windows is user friendly and light weight , where as unix/linux are still not( ubantu is closer.....but not like windows). We would discuss the tough situation here  where in all Secure Zone environment based subscribers are ported on unix boxes .  So whats the current challenge.
Challenges are mentioned below
  1. From public zone  test accelerators can not connect to private zone queues
  2. Server Side Operating system metrics can not be tracked as from public zone ssh client  for accesing server or Agent less sitescope does not work 
  3. Jvm needs to  monitored via GUI tool Jconsole,which can not be done as  only CUI (character user interface) can be provided
  4. queue depth needs to be checked via  GUI tool which can not be done as  only CUI (character user interface) can be provided
  5. Network team will not open  firewall for  VNC for remote gui login.
So as a performance  tester what should be my approach now?
Approach :My straight forward approach would be as mentioned below
  1. I would ask Middleware team to  give me access to a unix box  (jump box )which can connect to any machine in secure zone .
  2. I would like to  port my  platform independent java test accelerator  in secure zone ,would tap messages at secure queue  by diverting the traffic to a NF_temp queue , steal the messages then throttle it at will back to original queue where routed traffic was suppose to connect.
  3. To address Sitescope connectivity issue i would write shell script counters on the respective boxes where secure subscribers are runnning  and take the metrics .. i.e.. top,io,memory,swap,vmstat outputs combined into a csv file 
  4. Now finally  to solve the problem of  how to solve Gui Monitoring? Sure!!!!! I have a solution!!!!
  • Download Xming client  http://sourceforge.net/projects/xming/ and install on your windows client
  • Using Putty Client http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html connect to Linux  jump box
  • open C:\Program Files (x86)\Xming\X0.hosts  and enter the ipaddress or resolvable hostname 
  • restart Xming
  • In Unix box  export the display to windows box. export DISPLAY=192.168.0.1:0.0(where 192.168.0.1 is my windows box from where i will run my linux box)
  • now run jconsole gui tool . you would see the linux GUI exported to windows . 
So this way we can  test a message architecture in secure zone ..  for more details IM me. 

No comments:

Post a Comment