百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
T

tiopatinhas

> 编程语言
开源

An AWS 自动调整规模的辅助工具,通过使用现货市场的实例节省成本

99 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

An AWS 自动调整规模的辅助工具,通过使用现货市场的实例节省成本

tiopatinhas

Overview

tiopatinhas (tp) is a companion for AWS's Auto Scaling. It attaches itself to an Availability Group and adds resources bought in Amazon's Spot market.

As we can lose those instances at any time (due to market conditions), tiopatinhas only allows itself to provide about 50% of the total number of running instances.

Other features include:

  • efficient use of resources. tiopatinhas is aware of Amazon's one-hour billing cycles and has protections against "flapping"
  • crash recovery: in case there is a market crash, tiopatinhas can acquire instances on the regular OnDemand market
  • fail-safe design: tiopatinhas fails "up". If the process crashes, the worse thing that can happen is extra servers being left in the cluster. Amazon's Autoscaling rules are not modified at all and can take over at any time.

Our theory of operations is that even when the system is live, each server is actually about 50% idle so that the system can responde to changes in access patterns. How much you can commit to Spot Instances is correlated to how low you keep your load during normal system operations. Needless to say, you shouldn't use Spot Instances in systems which are not fault tolerant.

Getting Started

Before starting

  1. Make sure the boto python package is installed in your system. If you use debian or ubuntu you can install it by typing: 'sudo pip install boto'.
  2. Make sure your AWS credentials are specified in a boto configuration file (typically ~/.boto). Instruction on how to setup this file can be found here.
  3. To run the setup, you may need to install setuptools

Configuring tiopatinhas

  • Copy the template conf file (tp.conf.template) to tp/tp.conf so that the script can read it and make the changes according to your needs. Tio patinhas currently supports the following properties:

Mandatory Properties

  • max_price: A map that specifies the maximum bid prices for each type of EC2 instance. TP will use the prices specified in this map to bid for instances of that type in the spot market.
  • max_candidates: The maximum number of instances TP will manage.
  • instance_name: The prefix that will be used by TP to name managed instances.
  • region: The AWS region where the AutoScaling group is located.
  • placement: The AWS availability zone where TP instances will be launched.

Advanced properties

  • spot_type: The instance type to bid for in the spot market (recommended: the same instance from the ASG)
  • emergency_type: The instance type to buy in case of market crash (recommended: the same instance from the ASG)
  • bid_threshold: Time to wait before doing another spot bid to AWS. Defaults to 300 seconds.
    • More information can be found here.
  • cool_down_threshold: Time to wait before doing another scale action again. Defaults to 360 seconds.

Optional properties

  • tags: A map containing custom metadata tags that must assigned to TP instances. (optional)
    • More information can be found here.
  • user_data_file: An optional script or data that will be supplied to the instance on startup. If not provided, it will try to get from the Launch Configuration Group. (optional)
    • More information can be found here.
  • subnet_id: The VPC's subnet id that will be used by instances TP will manage. (optional)
    • More information can be found here.
  • monitoring_enabled: There are two types of Monitoring: basic and detailed. You can enable or disable the detailed monitoring by setting this field to True or False. (optional)
    • More information can be found here.

Coding with tiopatinhas

To install the latest version directly from GitHub:

bash
$ git clone https://github.com/chaordic/tiopatinhas.git
$ python tiopatinhas/setup.py install

You may need to use sudo depending on your environment setup.

Then:

python
from tp import tp

t = tp.TPManager("auto scaling group name", debug=verbose)
t.run()

Executing tiopatinhas

To install the latest version directly from GitHub:

bash
$ git clone https://github.com/chaordic/tiopatinhas.git
$ python tiopatinhas/setup.py install

You may need to use sudo depending on your environment setup.

  • Once the tp/tp.conf file is ready, execute tiopatinhas with the following command:
    • _python tp.py -g _ (this command must currently be executed from within the "tp" folder)
  • You must optionally supply options "-v" for verbose mode or "-d" for daemon mode.

License

tiopatinhas is available under the MIT license.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言