Cloudibn News

Be updated with Technology

  • BIG Data & Analytics
  • CLOUD
  • Data Center
  • IOT
  • Machine Learning & AI
  • SECURITY
  • Blockchain
  • Virtualization
You are here: Home / CLOUD / Checklist: Is your application ready for a container cluster?

Checklist: Is your application ready for a container cluster?

November 28, 2019 by cbn Leave a Comment

Is your application ready to run on a container cluster? Use this checklist to find out whether you are good to deploy your application on Amazon Elastic Container Service (ECS) and AWS Fargate or any other container cluster solution.

Checklist

Does your application fulfill the following five requirements?

✅ Stateless: avoid persisting data

Your application (call it a microservice if you want to) is stateless. Answering a request or processing a job does not rely on reading data stored by previous requests or jobs. This applies to data from memory as well as a local disk.

Instead of that, your application stores data in a SQL/NoSQL database (e.g., RDS or DynamoDB), an in-memory database (Elasticache), or any other fully-managed storage service (e.g., S3).

✅ Logging: write to stdout and stderr

Your application writes log messages to standard output (stdout) and standard error (stderr). Do not write log messages to files. (see Stateless). Docker has built-in support to ship log messages from stdout and stderr to various centralized logging solutions (e.g., CloudWatch Logs). Check out A simple way to manage log messages from containers: CloudWatch Logs to learn more.

✅ Configuration: use environment variables

Your application reads configuration parameters from environment variables (e.g., the database endpoint or any other service endpoint). Do not use files to store the configuration for your application.

Use a templating engine for configuration files if you are containerizing a legacy application. I prefer envsubst to do so. Alternatively, you could have a look at Dockerizing legacy applications with confd.

✅ Process: restrict to one process

Your container starts exactly one main process. If your application consists of more than one process, split them up into multiple containers. For example, if you run NGINX and PHP-FPM, create two containers.

✅ Remote access: disable SSH

Your container does not start an SSH daemon. Do not install or enable SSH within a container (see Processs). Use docker attach to log into a container if needed for debugging. On top of that, optimize your logging.

✅ Shutdown: avoid canceling requests and jobs

Your application receives KILL signals and shuts down gracefully. Test whether the KILL signal triggered by docker kill leads to your application stopping to answer new requests or start new jobs and terminate after the last request or job has been completed.

  • Does your Dockerfile contain ENTRYPOINT or CMD in shell form? Your main process will not receive any KILL signals.
  • Are you starting your main process from a shell script? Make sure you are using exec to do so.

When using Fargate it is necessary, that your application is able to shutdown gracefully within 2 minutes.

🎉 Summary

Checked all five requirements from the checklist? Happy you! Your application is ready for ECS and Fargate or any other container cluster solution.

📚 eBook and Online Seminar

Do you want to learn more about how to ship your application with Docker? Our ebook and online seminar Rapid Docker on AWS teaches you how to dockerize PHP, Ruby on Rails, Python Django, Java Spring Boot, and Node.js Express applications.

Share on FacebookShare on TwitterShare on LinkedinShare on Pinterest

Filed Under: CLOUD

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • May 2015

Recent Posts

  • Checkmarx Launches Infrastructure as Code Scanning Solution to Secure Cloud-Native Applications
  • A worldwide IoT network grid to harness the power of connectivity
  • Blockchain Newsletter for February: Sustainability, COVID-19, crypto and digital events
  • Webinar: Solve Two Key Issues Managing Remote Workers on Citrix or Horizon
  • The role of IoT in healthcare during Covid-19

Recent Comments

  • +905443535397 on Announcing Cognitive Search: Azure Search + cognitive capabilities

Categories

  • Artificial intelligence
  • BIG Data & Analytics
  • BlockChain
  • CLOUD
  • Data Center
  • IOT
  • Machine Learning
  • SECURITY
  • Storage
  • Uncategorized
  • Virtualization

Categories

  • Artificial intelligence (46)
  • BIG Data & Analytics (33)
  • BlockChain (317)
  • CLOUD (1,656)
  • Data Center (10)
  • IOT (1,968)
  • Machine Learning (146)
  • SECURITY (343)
  • Storage (21)
  • Uncategorized (62)
  • Virtualization (830)

Subscribe Our Newsletter

0% Complete

Copyright © 2021 · News Pro Theme on Genesis Framework · WordPress · Log in