Chaos event testing using simulated traffic feed and chaos events simultaneously
Computer systems and methods perform a chaos experiment for a target application. The computer system: (i) generates, for the chaos experiment, a simulated traffic stream for a non-production version of the target application; (iii) provides chaos event settings for one or more chaos conditions to the non-production version of the target application; (iv) executes the non-production version of the target application during the chaos experiment, such that the non-production version of the target application, during the chaos experiment, (a) generates responses to the simulated traffic stream while simultaneously (b) being subject to the one or more chaos conditions of the chaos event settings; and (iv) monitors the responses generated by the non-production version of the target application during the chaos testing.
1 . A computer system for performing a chaos experiment for a target application, the computer system comprising:
one or more processors; and
computer memory in communication with the one or more processors, wherein the computer memory stores instructions that when executed by the one or more processors, causes the one or more processors to:
generate, for the chaos experiment, a simulated traffic stream for a non-production version of the target application based on a simulated traffic condition, wherein the simulated traffic condition is selected by a user from a plurality of simulated traffic scenarios, wherein the simulated traffic stream simulates a historical traffic stream for a production version of the target application, and wherein the historical traffic stream comprises a learned traffic pattern defined within an upper and lower bound of at least one of a peak number of transactions per second or a peak number of users for the target application;
provide chaos event settings for one or more chaos conditions to the non-production version of the target application;
execute the non-production version of the target application during the chaos experiment, such that the non-production version of the target application, during the chaos experiment, (i) generates responses to the simulated traffic stream while simultaneously (ii) being subject to the one or more chaos conditions, wherein the simulated traffic stream and the one or more chaos conditions are executed in a coordinated manner based on declarative user-defined parameters; and
monitor the responses generated by the non-production version of the target application during the chaos experiment.
2 . The computer system of claim 1 , wherein:
the declarative user-defined parameters comprise chaos condition parameters; and
the computer memory further stores instructions that when executed by the one or more processors, causes the one or more processors to:
generate a declarative YAML file defining the chaos condition parameters for the one or more chaos conditions for the chaos experiment for the target application, wherein the chaos condition parameters for the one or more chaos conditions are based on a user input for the chaos experiment; and
provide the chaos event settings to the non-production version of the target application based on the chaos condition parameters from the declarative YAML file.
3 . The computer system of claim 2 , wherein the declarative user-defined parameters comprise custom traffic stream conditions, wherein the computer memory further stores instructions that when executed by the one or more processors, causes the one or more processors to generate the simulated traffic stream from a Java Management Extensions (JMX) script for the target application based on the custom traffic stream conditions.
4 . The computer system of claim 3 , wherein:
the simulated traffic stream comprises Hypertext Transfer Protocol (HTTP) requests; and
the responses generated by the non-production version of the target application comprise HTTP status codes.
5 . The computer system of claim 4 , the one or more chaos conditions comprises a condition selected from the group consisting of:
central processing unit (CPU) stress for a container for the target application;
network loss for the container for the target application;
memory stress for the container for the target application;
Domain Name System (DNS) spoof for a pod for the target application;
container kill for the container for the target application;
network latency for the container for the target application; and
pod failure for the pod for the target application.
6 . The computer system of claim 1 , wherein the target application comprises a containerized application.
7 . The computer system of claim 1 , wherein the target application comprises an application running on a virtual machine.
8 . The computer system of claim 1 , wherein:
the simulated traffic stream comprises HTTP requests; and
the responses generated by the non-production version of the target application comprise HTTP status codes.
9 . The computer system of claim 1 , wherein the one or more chaos conditions comprises a condition selected from the group consisting of:
CPU stress for a container for the target application;
network loss for the container for the target application;
memory stress for the container for the target application;
DNS spoof for a pod for the target application;
container kill for the container for the target application;
network latency for the container for the target application; and
pod failure for the pod for the target application.
10 . A computer system for performing a chaos experiment for a target application, the computer system comprising:
means for generating, for the chaos experiment, a simulated traffic stream for a non-production version of the target application based on a simulated traffic condition, wherein the simulated traffic condition is selected by a user from a plurality of possible simulated traffic scenarios, and wherein the plurality of possible simulated traffic scenarios comprises a learned traffic stream based on monitoring of a production version of the target application,
and wherein the learned traffic stream is defined within at least one of an upper and lower bound of a peak number of users for the target application or an upper and lower bound of a peak number of transactions per second; and
means for providing chaos event settings for one or more chaos conditions to the non-production version of the target application,
wherein during the chaos experiment, the non-production version of the target application is executed by the computer system such that the non-production version of the target application, during the chaos experiment, (i) generates responses to the simulated traffic stream while simultaneously (ii) being subject to the one or more chaos conditions, wherein the simulated traffic stream and the chaos conditions are executed in a coordinated manner based on declarative user-defined parameters.
11 . A computer-implemented method for performing a chaos experiment for a target application, the method comprising:
receiving, for the chaos experiment, by a computer system that comprises one or more processors, a signal indicative of a user selection corresponding to a simulated traffic condition selected by a user;
generating, for the chaos experiment, with the computer system, a simulated traffic stream for a non-production version of the target application based on the simulated traffic condition, wherein the simulated traffic stream simulates a historical traffic stream for a production version of the target application, and wherein the historical traffic stream comprises a learned traffic pattern defined within an upper and lower bound of at least one of a peak number of transactions per second or a peak number of users for the target application;
providing, by the computer system, chaos event settings for one or more chaos conditions to the non-production version of the target application;
executing, by the computer system, the non-production version of the target application during the chaos experiment, such that the non-production version of the target application, during the chaos experiment, (i) generates responses to the simulated traffic stream while simultaneously (ii) being subject to the one or more chaos conditions, wherein the simulated traffic stream and the chaos conditions are executed in a coordinated manner based on declarative user-defined parameters; and
monitoring, by the computer system, the responses generated by the non-production version of the target application during the chaos experiment.
12 . The method of claim 11 , wherein:
the declarative user-defined parameters comprise chaos condition parameters; and
providing the chaos event settings to the non-production version of the target application comprises:
generating a declarative YAML file defining the chaos condition parameters for the one or more chaos conditions for the chaos experiment for the target application, wherein the chaos condition parameters for the one or more chaos conditions are based on a user input for the chaos experiment; and
providing the chaos event settings to the non-production version of the target application based on the chaos condition parameters from the declarative YAML file.
13 . The method of claim 12 , wherein generating the simulated traffic stream comprises generating the simulated traffic stream from a Java Management Extensions (JMX) script for the target application.
14 . The method of claim 13 , wherein:
the simulated traffic stream comprises Hypertext Transfer Protocol (HTTP) requests; and
the responses generated by the non-production version of the target application comprise HTTP status codes.
15 . The method of claim 14 , wherein the one or more chaos conditions comprises a condition selected from the group consisting of:
central processing unit (CPU) stress for a container for the target application;
network loss for the container for the target application;
memory stress for the container for the target application;
Domain Name System (DNS) spoof for a pod for the target application;
container kill for the container for the target application;
network latency for the container for the target application; and
pod failure for the pod for the target application.
16 . The method of claim 11 , wherein the target application comprises a containerized application.
17 . The method of claim 11 , wherein the target application comprises an application running on a virtual machine.
18 . The method of claim 11 , wherein:
the simulated traffic stream comprises HTTP requests; and
the responses generated by the non-production version of the target application comprise HTTP status codes.
19 . The method of claim 11 , wherein the one or more chaos conditions comprises a condition selected from the group consisting of:
CPU stress for a container for the target application;
network loss for the container for the target application;
memory stress for the container for the target application;
DNS spoof for a pod for the target application;
container kill for the container for the target application;
network latency for the container for the target application; and
pod failure for the pod for the target application.