Table of contents
1.
Introduction
2.
Scaling the Chef Infra Server
3.
CCRs Per Minute
4.
Assumptions
5.
Host Specifications
6.
Frequently Asked Questions
6.1.
What is the infra component name in Chef?
6.2.
What is the use of chef infra?
6.3.
What are the differences between Ansible and Chef?
7.
Conclusion
Last Updated: Mar 27, 2024

Capacity Planning in Chef Infra Server

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

This article shows direction on capacity planning in Chef Infra Server and selecting the best layout for the Chef Infra Server, such as standalone, high availability, or tiered. This document shows recommendations rather than rigid guidelines. This is due to the computationally expensive nature of some queries to the Chef Infra Server API. It is commonly better to scale the Chef Infra Server after a small first deployment. Due to the potential introduction of needless complexity, premature optimisation may cause more harm than good.

Chef Infra Server

Scaling the Chef Infra Server

The Chef Infra Server is scalable by itself. The Chef Infra Server runs on a single virtual machine, handling requests for tens of thousands of nodes. It is a simple process to transition to a tier-based front-end, back-end design to relieve strain on system bottlenecks as the scale grows. This is an essential element of Capacity Planning in Chef Infra Server. 

To run every node in an infrastructure from a single, centralised, monolithic Chef Infra Server instance/cluster is not recommended; it is preferable to segregate failure domains with their own Chef Infra Server. For instance, it is advised to have one Chef Infra Server instance in each data centre if there are data centres on the West and East coasts. Each Chef Infra Server's deploys can be coordinated upstream by CI software. Input/output operations per second (IOPS) throughput for the database filesystem is nearly always the main bottleneck for Chef Infra Server setups.f Infra Server.

Chef Infra Server Overview

CCRs Per Minute

The quantity of Chef Infra Client runs per minute, or CCRs/min, is a vital indicator of how well the Chef Infra Server is scaling. As an illustration, 16.66 CCRs/min equals 500 nodes set to check every 30 minutes.

The Chef Infra Server often does not need high availability or tiered topology until the number of CCRs/min surpasses 333/min. It is approximately ten thousand nodes.

The artificial measures should not be taken too seriously because they rarely reflect performance in real-world settings. A solitary Chef Infra Server running on an Amazon Web Services (AWS) c3.2xlarge server was able to process more than 1,000 CCRs per minute according to internal benchmarks at Chef. About thirty thousand nodes.

Assumptions

A variety of things may influence server scalability. All suggestions for server sizing are based on the following presumptions: They directly affect Capacity Planning in Chef Infra Server.

1) Daemonization is used for Chef Infra Client runs. Cron jobs do not launch them. There may be "thundering herd" issues when using cron to schedule runs.

2) The default period for Chef Infra Client runs 30 minutes, with a 5-minute splay.

3) There is minimal use of search and partial search.

4) Across all versions, the Chef Infra Server has fewer than 500 cookbooks available per company. It is acceptable for multiple groups, each with fewer than 500 cookbooks but with more than 500 cookbooks overall. 

5) Although nodes rarely exceed 150KB, the default maximum size for a node object is 1MB. This data is duplicated twice, once in Elasticsearch and once in PostgreSQL, despite being compressed. It should be sufficient to allocate just 2MB of storage per node on the disc partition.

Host Specifications

The sections below go through host requirements for different CCR/min sizes and indicate when switching from a standalone design to a tiered or high availability topology could be advantageous. They help us become clear with Capacity Planning in Chef Infra Server. This is because we turn sure of the specifications and act accordingly.

A MAXIMUM OF 33 CCRs per minute(about 1,000 nodes):

Chef advises using just one virtual machine instance.

Start with an instance of the Amazon EC2 m3.large platform with 2 CPU cores and 8GB of RAM.

Give each managed node a 2MB disc space allocation on the data partition.

A MAXIMUM OF 167 CCRs per minute (about 5,000 nodes):

Chef advises using just one virtual machine instance.

Start with an Amazon EC2 m3.xlarge instance-sized configuration of 4 CPU cores and 16GB of RAM.

A MAXIMUM OF 333 CCRs per minute (about 10,000 nodes):

Chef advises using just one virtual machine instance.

Start with an Amazon EC2 m3.2xlarge instance's equivalent of 8 CPU cores and 32GB of RAM.

A MAXIMUM OF 667 CCRs per minute (about 20,000 nodes):

Chef suggests one front-end host and one back-end host.

The front-end server does not need much disc space.

Each host should initially have 8 CPU cores and 32GB of RAM, equal to an Amazon EC2 m3.2xlarge instance.

Scaling a single cluster to more than 20,000 nodes:

The front-end node can be given more capacity by being placed behind an HTTP load balancer and then scaled horizontally.

Chef suggests using professional Chef services to assist with capacity and architectural planning at this scale.

Frequently Asked Questions

What is the infra component name in Chef?

Workstations, servers, and nodes make up the three core parts of Chef. The system where the administrator works are called a workstation. A recipe is a piece of code that the system generates to manage and configure infrastructure. It is written in Ruby.

What is the use of chef infra?

Chef Infra is a robust automation platform that turns infrastructure into code. Chef Infra automates infrastructure configuration, deployment, and management across the network, regardless of its scale, whether we are operating in the cloud, on-premises, or in a hybrid environment.

What are the differences between Ansible and Chef?

Unlike Chef, a commercial automation tool, Ansible is an open-source IT solution. Ansible is used for automating application deployment and configuration management. It works well for brief instructions like updating Linux or RHEL operating systems.

Conclusion

In the article, we learned about capacity planning in Chef Infra Server. We also read about the scaling of the Chef Infra Server. We read about the number of runs and the things that may impact server scalability. Visit our blogs on Chef to find out more. Go inside to find out how to configure Chef infra server and manage Chef infra server. If you want to dive deeper, find out about Chef Habitat Installation and Common Terms related to Chef InSpec. Explore Coding Ninjas Studio to find more exciting stuff. Happy Coding!

Thank you

Live masterclass