
Ask HN: How will using containers save me money? - sly010
I am in a situation, where I am running multiple small independent apps in the cloud.
They are each very low traffic with occasional traffic spikes, so they require very little resources
on a day-to-day basis.<p>In the ancient world they would be running on a large colocated server under different users, perhaps using something like chroot, etc. The resources would be very well utilized but it would be a security and operations nightmare.<p>In the IAAS world I can rent instances of various sizes, one per my small application.
This would improve on security and operations, but the resources are horribly allocated.
I need every server to be sized so it can carry it&#x27;s app at peak traffic, but otherwise
they are all idling most of the time.<p>In the container (CAAS?) world security and operations are basically solved, but I am
still not convinced about resource utilization.<p>Both AWS and GCE promise to deploy containers on top of their &quot;compute platform&quot;
and charge me for used instances + some more for the management of the container platform.<p>So it seems by using containers to deploy my application I am still paying for
the same underutilized resources, while giving the platform provider the possibility
to optimize things behind my back. Basically I am saving THEM money.<p>I know could just pay for one big box and run all my applications on it, running docker
and deploying containers by hand, but then I would be back managing things myself.<p>So how can I use containers to better utilize resources and save ME money?
======
moondev
Not all application resource demands fit nicely inside instance types.

Once you determine your application needs, you can set your cpu/memory
resource needs per container/service. Then you can run these containers inside
your fleet more smartly.

This really comes into play for memory and cpu ratio. Look at the price
difference between:

one m4.2xlarge = 32gb mem, 8 cores = $350 a month

eight t2 medium = 32gb memory, 8 cores = $300 a month

You get twice as much compute for less money with the ability to mix and match
service needs instead of being constrained to individual instances.

~~~
sly010
The key thing I missed is the fact that I am not limited to running a single
container per instance. I never actually tried to run anything on either
container engine and from their high level marketing blabla this was not
immediately obvious.

~~~
moondev
Yep, you can run as many containers as resources available.

You set the cpu limit per container based on cpu units. There are 1024
available per core.

------
tmaly
I am still running micro-services outside containers. The main problem for me
is upgrading the various programs nginx, postgresql etc. I have to recompile
code by hand in many cases instead of having it automated in containers.

This is where I think containers would save me the most time and money.

