Heroku负责多个数据库服务器? [英] Heroku takes care of multiple database servers?

查看:114
本文介绍了Heroku负责多个数据库服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的用户群增长时,Heroku是否会为我的Rails应用程序设置多个数据库服务器,还是必须手动配置它?



其他的话,Heroku能够在需要时正确地扩展和正确(复制服务器)吗?

.heroku.comrel =noreferrer> Heroku 拥有云端管理的一切功能,并有三种扩展方式: db dynos 工人。 Heroku不会为你扩展你的应用程序。您有责任调整控制cpu /数据库存储量的设置。我将概述Heroku是如何工作的,但现在直接回答这个问题,说Heroku有两种选择:共享的,专用的。专用机器将信息保存在一台机器上,但机器会相应加强,Heroku将其配置为计算单元,而共享数据库则共享数据库的机器。



如果您正在阅读此答案, t知道 Heroku ,阅读这些内容比浏览更重要。



首先让我说它的免费在Heroku上部署应用程序,除非您想添加资源。使用你的git完成部署,例如:


  • heroku创建

  • heroku push master
  • >
  • heroku rake db:migrate



当你想更新你的应用程序时,有三件事: p>


  • git add。

  • git commit




这怎么可能。与 heroku宝石



有点吓人Heroku能够更好地部署和扩展Ruby应用程序,所以我也有这个问题并做了一些研究。事实证明,用Heroku扩展应用程序真的只需要三件事: //docs.heroku.com/dynosrel =noreferrer> Dynos

  • 工作人员

  • 数据库



  • 您只需将您的dynos(基本上是精简流程)或工作人员(用于延迟工作)增加到扩展您的应用程序。



    基本上有三种方式可以销售您的应用程序。


    1. 选择一个数据库

    2. 选择你想要运行多少个dynos

    3. 选择要运行的工作人员数量



    Dynos和工作人员都以每小时$ 0.05美元左右的价格运行

    然后你可以选择5个Databse选项。


    1. Blosom 最多可免费使用5 Mb

    2. Koi 每月$ 15美元至20 Gb

    然后你的数据库有专门的服务器,像这样工作:

    < ol start =3>

  • 罗宁 - $ 200 /月 - 1个计算 - 最大2 TB数据库
  • Fugu - 400美元/月 - 5个计算单元 - 2 TB数据库最大数量
  • Zilla - 每月1600美元 - 20个计算单元 - 2 TB数据库最大数量

    唯一的就是专用于一台服务器是你的数据库,你hav e为此选择一个选项。其他的东西都在云中,像这样分层到不同的服务器中:


    1. HTTP Reverse prox y - 照顾DNS - 在Niginz上工作

    2. HTTP Cache - 适用于 - 清漆

    3. 自定义路由网格 - 适用于Erlang

    4. Dynos - 基本瘦身处理

    5. PostgreSQL Memcached


    When my user base grows, does Heroku take care of setting up multiple database servers for my Rails app or do I have to configure it manually somehow?

    In other words, does Heroku scale well and correctly (replicate servers) when needed?

    解决方案

    Heroku has everything managed in their cloud and has three ways to scale: db, dynos, and workers. Heroku will not scale your application for you. It is your responsibility to adjust settings that control how much cpu / database storage. I will outline how Heroku works below but right now directly answer the question by saying that there are two options for databases with Heroku: shared, dedicated. Dedicated machines keep info on one machine but machines are beefed up accordingly which Heroku dubs compute unit while shared dbs share machines for databases.

    If you are reading this answer and don't know about Heroku it's more important to go check them out than reading on.

    First let me say its FREE to deploy applications on Heroku unless you want to add resources. Deployment is done with your git such as:

    • heroku create
    • heroku push master
    • heroku rake db:migrate

    Whenver you want to update your your app it's three things:

    • git add .
    • git commit
    • git push heroku

    How is this possible. with the heroku gem.

    It's kinda scary how much better Heroku takes care of deploying and scaling Ruby applications so I also had this question and did some research. It turns out that there are really only three things you need to know to scale your application with Heroku:

    All you have to do is increase your dynos (basically thin processes) or workers (for delayed jobs) to scale your application.

    There are basically three ways to sale your application

    1. Choose a DB
    2. Choose how many dynos you want running
    3. Choose how many workers you want running

    Dynos and workers both run about $.05 / hour

    Then you can choose from 5 Databse options.

    1. Blosom is free up to 5 Mb
    2. Koi is $15/month up to 20 Gb

    And then there are dedicated servers for your DB which work like this:

    1. Ronin - $200 / month - 1 compute - 2 TB database max
    2. Fugu - $400 / month - 5 compute units - 2 TB database max
    3. Zilla - $1600 / month - 20 compute units - 2 TB database max

    The only thing that is will be dedicated to one server is your database and you have to choose an option for that to happen. Everything else is in the cloud layered into different servers like this:

    1. HTTP Reverse proxy - takes care of DNS - works on Niginz
    2. HTTP Cache - Works on - Varnish
    3. Custom Routing Mesh - works on Erlang
    4. Dynos - Basically thin proceses
    5. PostgreSQL and Memcached

    这篇关于Heroku负责多个数据库服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆