承接 chaos-php/chaos-monkey-symfony-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chaos-php/chaos-monkey-symfony-bundle

最新稳定版本:1.0.0

Composer 安装命令:

composer require chaos-php/chaos-monkey-symfony-bundle

包简介

Chaos Monkey for Symfony applications

README 文档

README

Minimum PHP Version Symfony Versions Supported Packagist Version ci GitHub

Chaos Monkey for Symfony applications. Try to attack your running Symfony App.

Assaults

  • Latency Assault - adds a delay randomly from the range (min and max)
  • Exception Assault - throws given exception class
  • Memory Assault - fill memory until target fraction (95% for example)
  • Kill Assault - no mercy, plain exit()

Watchers

  • Request - attack http request
  • Repository (not implemented)
  • Service (not implemented)

Activators

  • "Query param" - attack only if given query param is present (default chaos)

Symfony

How to use

  1. Install with composer:
    composer require chaos-php/chaos-monkey-symfony-bundle
  2. Add Symfony bundle (e.g. config/bundles.php):
    return [
        //... other bundles
        Chaos\Monkey\Symfony\ChaosMonkeyBundle::class => ['all' => true],
    ];
  3. Add chaos_monkey.yaml configuration (copy from below) and enable assaults
  4. Watch your app plunge into chaos 🙈🙊🙉 😈

Configuration reference

chaos_monkey:
    enabled: false
    probability: 20 # percentage probability of attack (100 - everyone, 0 - none)
    assaults:
        latency:
            active: false
            minimum: 1000 # in miliseconds
            maximum: 3000 # in miliseconds
        memory:
            active: false
            fill_fraction: 0.95 # percentage of memory filling
        exception:
            active: false
            class: 'RuntimeException'
        kill_app:
            active: false
    watchers: # currently watchers can be enabled/disabled only in container compile time
        request:
            enabled: true
            priority: 0
    activators:
       query_param: false # if true then chaos monkey will be called only if given query param exist (with any value)
       query_param_name: 'chaos'

Roadmap

  • Flex recipe
  • Metrics (for example chaos_monkey_request_count_assaulted)
  • Assault profiles - each profile can contain different assaults
  • CustomWatcher (based on container tag)
  • CustomAssault (not implemented)

License

ChaosMonkeySymfonyBundle is released under the MIT Licence. See the bundled LICENSE file for details.

Author

Arkadiusz Kondas (@ArkadiuszKondas)

统计信息

  • 总下载量: 345
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 87
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 87
  • Watchers: 5
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-20