设置临时和生产环境并最大限度地减少简单托管的停机时间

发布于 2024-10-18 01:56:53 字数 443 浏览 1 评论 0原文

我有一个 ASP.NET MVC 3 应用程序 WouldBeBetter.com,当前托管在 Windows Azure 上。我有一个介绍性特别订阅套餐,可以免费使用几个月,但我很惊讶它竟然如此昂贵(平均每分钟 150 欧元!),现在我已经开始付费了。对于一个不会很快赚钱的网站来说,这实在是太多了,所以我决定转向常规托管提供商 (DiscountASP.Net)。

不过,我真正怀念的一件事是 Azure 提供的分离的暂存和生产环境,以及零停机环境交换。

我的问题是,在传统提供商上托管时如何“模拟”临时环境?最大限度地减少新部署的停机时间的最佳方法是什么?

谢谢。

更新:我选择这个答案并不是因为我认为它是最好的方法,而是因为它目前对我来说最有意义。

I have an ASP.NET MVC 3 application, WouldBeBetter.com, currently hosted on Windows Azure. I have an Introductory Special subscription package that was free for several months but was surprised at how expensive it has turned out to be (€150 p/m on average!) now that I have started paying for it. That is just way too much money for a site that is not going to generate money any time soon so I've decided to move to a regular hosting provider (DiscountASP.Net).

One of the things I'll truly miss though, is the separated Staging and Production environments Azure provides, along with the zero-downtime environment swap.

My question is, how could I go about "simulating" a staging environment while hosting on a traditional provider? And what is my best shot at minimizing downtime on new deployments?

Thanks.

UPDATE: I chose the answer I chose not because I consider it the best method, but because it is what makes the most sense for me at this point.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

顾铮苏瑾 2024-10-25 01:56:53

在放弃 Windows Azure 之前,您可以采取一些节省成本的措施来降低每月的账单。例如:

  • 如果您同时拥有 Web 角色和 Worker 角色,请将两者合并。进行后台处理、队列处理等并在 Web 角色中运行它们(在 OnStart() 中执行耗时的启动,然后只需添加 Run() 覆盖来调用队列处理等。
  • 考虑新的 Extra Small实例,其成本不到小型实例的一半
  • 。在您确信生产代码运行正常后,请删除您的暂存部署,但请将 cspkg 放在手边,放在 blob 存储中,以便您随时可以重新部署它。

Before abandoning Windows Azure, there are several cost-saving things you can do to lower your monthly bill. For instance:

  • If you have both a Web role and a Worker role, merge the two. Take your background processing, queue processing, etc. and run them in your Web role (do your time-consuming startup in OnStart(), then just add a Run() override to call queue-processing, etc.
  • Consider the new Extra Small instance, which costs just under half of a Small instance
  • Delete your Staging deployment after you're confident your production code is running ok. Keep the cspkg handy though, in blob storage, so that you could always re-deploy it.
只是偏爱你 2024-10-25 01:56:53

我自己使用DiscountASP。这确实是非常基本的托管,有点落后于时代。但我发现只需创建一个子目录并发布我的 beta/test/任何版本都效果很好。它不花哨也不漂亮,但确实完成了工作。

为此,您需要首先创建子目录,然后进入控制面板并告诉 DASP 该目录是一个应用程序。然后您还必须考虑该目录的 web.config 将是其自身和父目录的组合。您还必须考虑此子目录的 robots.txt 并保护它免受爱管闲事的人的侵害。

您也可以通过子域来实现此目的,具体取决于您的域的设置方式。

另一种选择:appharbor?他们有一个免费计划。如果您可以留在他们的免费计划的范围内,它可能会运作良好(我从未使用过它们,但目前有兴趣尝试它们)

I use DiscountASP myself. It's pretty basic hosting for sure, a little behind the times. But I have found just creating a subdirectory and publishing my beta/test/whatever versions there works pretty well. It's not fancy or pretty, but does get the job done.

In order to do this you need to create the subdirectory first, then go into the control panel and tell DASP that directory is an application. Then you also have to consider that directory's web.config is going to be a combination of its own and the parent one. You also have to consider robots.txt for this subdirectory and protecting it in general from nosy people.

You could probably pull this off with subdomains too, depending on how your domain is set up.

Another option: appharbor? They have a free plan. If you can stay within the confines of their free plan, it might work well (I've never used them, currently interested in trying them though)

几度春秋 2024-10-25 01:56:53

1)获取自动化部署工具。有许多免费/开源的软件被数百万/十亿美元的公司实际用于其生产环境。

2) 获取与第一个相同的第二个托管包。将其用作暂存,然后在暂存通过后重新部署到生产环境。

1) Get an automated deployment tool. There are plenty of free/open-source ones that million/billion dollar companies actually use for their production environments.

2) Get a second hosting package identical to the first. Use it as your staging, then just redeploy to production when staging passes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文