Is there a way to improve the startup time for Amazon ECS Fargate tasks on Windows Containers? I am trying to deploy a legacy .NET Framework application on ECS Fargate. The application requires the Windows Server Core base image. It takes about 11 minutes for the fargate task to start.
Earlier, I had tried with Amazon ECS EC2 launch type with a customer AMI with cached docker images for Windows Server Core and the application startup time was about 2 minutes. I am wondering if there is a way with ECS Fargate to benefit from Windows Server base image caching.
Fargate recently added support for serverless windows containers. We tried adopting it in the same month it got rolled out to the public. We had to scrape information and get in touch with support to resolve issues. I am attaching the docs so it can help others.
Answering your question, we saw the same situations, fargate startup time for windows were way worse than the EC2 approach. sometimes it took 15 mins to get the service to Running state.
If this is a deal-breaker for you, I recommend sticking to the ec2 approach in production. We noticed scaling up ec2 from scratch on windows was way inefficient and that is where faragte showed improvements.
AWS Fargate Windows docs
https://aws.amazon.com/blogs/containers/running-windows-containers-with-amazon-ecs-on-aws-fargate/
https://aws.amazon.com/about-aws/whats-new/2021/10/aws-fargate-amazon-ecs-windows-containers/
Opinion, The windows serverless containers, still needs to mature. we decided not to go with it in production.
Related
We have 2 - 3 EC2 c5.9xlarge instances for research.
Besides the option to shut them down on a particular hour according to a scheduler please advise what is the best way to keep them up and running when I "touch" them by connecting/clicking them or any other wake up policy?
My goal is to save expenses and I am trying to find a best practice to manage these instances wisely.
Please advise from your professional experience.
You can utilize the EC2 Hibernation feature via which you can pause/resume your instances. This would give you the convenience of resuming your instances with all the processes running just like the way you had left the instance saving you a lot of time and effort in setting up the environment and reach your productive state faster.
Currently, EC2 Hibernation is available for Amazon Linux 2, Amazon Linux and Ubuntu 18.04. It is supported for your instance type which you use.
More details can be viewed here: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html
If you have Jenkins or other CI/CD tool available you can create a job there that would enable/disable particular EC2 instances. If you want something smaller then you can use aws-cli with cron and do the same. Some of my customers turn their VMs on at 7 AM and turn them off at 7 PM (mostly for testing/staging environments).
So scenario is to create a Blockchain network that is around a use case that takes input every 2 minutes. Now I need to do this on Bluemix hyperledger v0.6 and using docker. Should I deploy it on ECS or EC2 instances as blockchain is meant for multiple peers and they should be residing on each instance?
Bluemix has an excellent documentation which provides step by step instruction on getting started with block chain here: https://www.ibm.com/developerworks/cloud/library/cl-ibm-blockchain-101-quick-start-guide-for-developers-bluemix-trs/index.html?ca=drs-
The above doc provides you information such as - setting up your network, writing the chaincode, writing client apps, monitoring your code etc. you can follow that article to get an insight on how to proceed further. Hope this helps.
Does anyone know if there are any competing hosting alternatives I can explore other than Amazon Web Services for running very small instances of Windows virtual machines? I have used AWS for years but am thinking that it might be worth-while to see if there are better alternatives.
In particular, the scenario I have is this: I have created a Windows virtual machine image with the applications and configuration I want and then spin up VMs based on that image as I need from on the AWS spot market. I can go weeks at a time without needing any virtual machines but then will spin up 20 VMs for a few hours to do a particular job. I typically pay around .61 cents an hour per micro Windows VM running on AWS (keep in mind that the AWS spot market is way cheaper than reserved instances).
Does Microsoft Azure or any other service support a similar scenario? I don't mind paying a little more if the performance and such is better. However, it is absolutely critical that I can set things up so I only have to pay for VMs when I actually need them rather than keep paying for VMs that aren't in use.
Microsoft Azure has the capability you are looking for. You can upload your own images and then quickly deploy extra-small machines based on it. On Azure you can turf off the VM's through the Azure portal after you are finished with them and you will not be charged. Make sure that you do it through the portal and not the windows session or you will continue to be billed.
Check out this link for pricing information:
http://azure.microsoft.com/en-us/pricing/details/virtual-machines/
You can follow these steps to upload your image to your azure account:
http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-create-upload-vhd-windows-server/
Also, you can scale up very easy in the azure portal so this might help reduce your need for spinning up multiple machines.
I've already got an RDS instance configured and running, but currently we're still running on our old web host. We'd like to decrease latency by hosting the code within AWS.
Two concerns:
1) Future scalability
2) Redundancy ... not a huge concern but AWS does occasionally go down.
Has anyone had this problem where they just need to cheaply run what is essentially a database interface via a language such as PHP/Ruby, in 2 regions? (with one as a failover)
Does Amazon offer something that automatically manages resources, that's also cost effective?
Amazon's Elastic Beanstalk service supports both PHP and Ruby apps natively, and allows you to scale your app servers automatically.
In a second region, run a slave RDS instance off of your master (easy to set up in RDS) and have another beanstalk setup there ready as a failover.
Suppose i have created an amazon load balancer with three ec2 instances :A,B,C.
Whenever i deploy an asp.net app to the instance A ,Does Load balancing deploy/updates it in the B,C instances?
If no,how one can achieve that?
The ELB (load balancer) has nothing to do with the deployment, at least nothing useful. It's just there to split traffic to different instances for incoming (http) requests from clients.
AWS Elastic Beanstalk (the easy way)
Create an Elastic Beanstalk Application, where you deploy your asp.net application via the Amazon Visual Studio Toolkit. The process is very straightforward and it's not your part to do the deployment to all instances. After building and uploading the project to S3 beanstalk will distribute the new version to all instances within 20-60 seconds, depending on the size.
Advantage:
very easy
existing Tools
it's Platform as a Service (PaaS), not Infrastructure as a Service (IaaS) which applies if you setup all AWS resources yourself.
Disadvantage:
you can just deploy ONE "project" per Beanstalk App which means you are not able to deploy different "virtual directorie apps"
maybe you need to build your own custom Beanstalk AMI, but usually you can use a AWS default image (beanstalk host manager needs to run on the instance, otherwise it will not work)
you may lose a little bit of control, but imho that's not an issue
More Infos:
https://aws.amazon.com/elasticbeanstalk/
https://forums.aws.amazon.com/forum.jspa?forumID=86
http://aws.amazon.com/visualstudio/
The harder way
If you have already setup a load balancer with 3 instances behind it's your task to deploy your code to all instances.
You could do that e.g. via Visual Studio and Web Deploy deploying to all 3 instances after another... you need to use the public dns name here of he instances itself, not the load balancer/app dns name.
You could use some kind of web server sync software for the app directories, e.g. MS web deploy, which should work, but the setup is not like fun imho and definitely more complex than Beanstalk.
More Infos:
http://www.iis.net/downloads/microsoft/web-deploy