All Projects → goldbergyoni → Node Chaos Monkey

goldbergyoni / Node Chaos Monkey

Licence: mit
Extremly naughty chaos monkey for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Node Chaos Monkey

Payload
Headless CMS and Application Framework built with Node.js, React and MongoDB
Stars: ✭ 154 (-9.41%)
Mutual labels:  express
Create React Redux App Structure
Create React + Redux app structure with build configurations ✨
Stars: ✭ 161 (-5.29%)
Mutual labels:  express
Node Connect Pg Simple
A simple, minimal PostgreSQL session store for Connect/Express
Stars: ✭ 166 (-2.35%)
Mutual labels:  express
Chat
Stars: ✭ 155 (-8.82%)
Mutual labels:  express
Github Ranking
🔍GitHub不同语言热门项目排行,Vue.js做页面展示
Stars: ✭ 160 (-5.88%)
Mutual labels:  express
Mono
Minimalist Framework on top of Express.js
Stars: ✭ 163 (-4.12%)
Mutual labels:  express
Chaostoolkit Kubernetes
Kubernetes driver extension of the Chaos Toolkit probes and actions API
Stars: ✭ 153 (-10%)
Mutual labels:  chaos-engineering
2019 12
🎟 급증하는 트래픽에도 안정적인 예약 서비스, Atomic Pattern을 적용한 재사용 가능한 컴포넌트, 실용적인 Testing을 주제로 하는 이벤트 서비스
Stars: ✭ 169 (-0.59%)
Mutual labels:  express
Frisky
🍿 Open Source GraphQL API for Online Shows
Stars: ✭ 161 (-5.29%)
Mutual labels:  express
Hydra Express
A module which wraps Hydra and ExpressJS into a library for building distributed applications - such as microservices
Stars: ✭ 166 (-2.35%)
Mutual labels:  express
Typescript Mern Starter
Build a real fullstack app (backend+website+mobile) in 100% Typescript
Stars: ✭ 154 (-9.41%)
Mutual labels:  express
Pumba
Chaos testing, network emulation, and stress testing tool for containers
Stars: ✭ 2,136 (+1156.47%)
Mutual labels:  chaos-engineering
Chaosengineeringbootcamp
A Chaos Engineering Bootcamp
Stars: ✭ 164 (-3.53%)
Mutual labels:  chaos-engineering
Corporate Bs Generator Api
Corporate Bullshit(BuzzWord) Generator API
Stars: ✭ 155 (-8.82%)
Mutual labels:  express
React Wp Rest
A boilerplate for pairing the WP Rest API with a server-rendered React app
Stars: ✭ 167 (-1.76%)
Mutual labels:  express
Youtubemeetupappreactnativenode
Repos of my youtube tutorial where we build a Meetup app with React-Native and Node
Stars: ✭ 153 (-10%)
Mutual labels:  express
Multer Gridfs Storage
🍃 GridFS storage engine for Multer to store uploaded files directly to MongoDb
Stars: ✭ 162 (-4.71%)
Mutual labels:  express
Api.xiaoduyu.com
🐟小度鱼 - 年轻人的交流社区 https://www.xiaoduyu.com
Stars: ✭ 168 (-1.18%)
Mutual labels:  express
Ecommerce Site Template
A beautiful e-commerce template powered by React, Redux and other modern web tech.
Stars: ✭ 167 (-1.76%)
Mutual labels:  express
Express Graphql Example
Example project how to use Express and GraphQL
Stars: ✭ 163 (-4.12%)
Mutual labels:  express

Extremely naughty Node.js chaos monkey

Chaos Monkey

74 items Last update: October 7th, 2018 Updated for Node 8.11.3 LTS

Caution: Alpha mode, we're now stabilizing the functionality and enhancing the docs. Consider contributing or visiting again soon


Don't go to production without 10 minutes of application-level chaos testing

"A software QA engineer walks into a bar

He orders a beer. Orders 0 beers. Orders 99999999999 beers. Orders a lizard. Orders -1 beers. Orders a ueicbksjdhd.

First real customer walks in and asks where the bathroom is. The bar bursts into flames, killing everyone."

Credit @brenankeller

Functional bugs are just a subset of the bad things that happen in production. In reality, unplanned chaos will affect your application reliability. How? your process will crash, the event loop might get blocked, many exceptions will not get caught, some unknowns will slow your API, other unknowns will increase your error rate. To name a few. Unlike most chaos tools, our project is focused on application-level chaos and specifically bad things that happen in Node.js applications.

Deploy like a pro by spending as little as 10 minutes on Chaos Testing:

1. Simulate some bad things (e.g. event loop is blocked, error rate is inclining)

2. Approach your APIs to ensure they function correctly

3. Ensure your monitoring systems became aware of the situation

We can seamlessly perform the two first tasks for you using our nit UI or command line

3 min start

Great for quick experiments, some pranks (damage) won't be available

A. Install: npm install node-chaos-monkey

B. Add a flag to start command: node -r node-chaos-monkey {your start file.js}

C. Trigger chaos using API or UI:

  • Browse to http/s://{host}/chaos and trigger some chaos
  • Invoke the API POST: http/s://{host}/chaos/random

This will trigger a random chaos, multiple pranks will get executed (e.g. memory overload, uncaught exceptions). Follow the log or the UI to see whatg happened and whether your app stayed resillience

5 min start (full functionality)

A. Install: npm install node-chaos-monkey

B. Add a reference in your code:

Require this package at the very beginning of your app, before registering other routes

const ChaosMonkey = require('chaos-monkey');
//pass in a reference to express app so the monkey can generate damage also within Express routes. This param is optional //but without it some pranks won't be available
ChaosMonkey.initialize(your-express-app);

C. Trigger chaos using API or UI:

  • Browse to http/s://{host}/chaos and trigger some chaos
  • Invoke the API POST: http/s://{host}/chaos/random

API and full documentation

1. Get list of available pranks

Method: GET

Address: http://localhost:8081/chaos/pranks-pool

Sent body: Empty

Return: [ { "name": "500-error-on-route", "file": "500-error-on-route", "active": false, "properties": { "urls": [ "/api/products", "/anyurl" ] }, "schedule": { "type": "immediate-schedule", "fadeOutInMS": 10000 } } ]

2. Activate a prank

Method: POST

Address: http://localhost:8081/chaos/pranks-activity

Sent body: ` { "name": "500-error-on-route", "file": "500-error-on-route", "active": false, "properties": { "urls": ["/api/products", "/anyurl"] }, "schedule": { "type": "immediate-schedule", "fadeOutInMS": 10000 } }

Return: `

3. Web socket: subscribe to prank

Method: WS

Address: http://localhost:8081

Event schema:

{name: '500-error-on-route', friendlyName: 'API returned a 500 status error', description: 'Our monkey intercepts HTTP routes and return errors on your behalf', lastHappened: new Date(), expectations: 'Your monitoring system should notify, error should appear in log', reality: 'The process has crashed', success: 'Yes' }

Example: `

<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.0.4/socket.io.js"></script>
<Script>
    var socket = io('http://localhost:8081');
    var isOkToEmit = true;

    console.log('after')
    socket.on('new-prank-activity', function (data) {
        console.log(`A new prank just ran ${data}`);
    });
</Script>
`
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].