# What is ngx\_cycle\_t represent

**URL:** <https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580>\
**Category:** NGINX\
**Created:** [January 9, 2012, 12:30pm UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580 "2012-01-09T12:30:08Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 9, 2012, 12:30pm UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/1 "2012-01-09T12:30:08Z")

</div>

I am new to nginx and trying to understand its internals. What does  
ngx\_cycle\_t represent and why does it have ?

Appreciate and pointers.

Posted at Nginx Forum:

> **[what is ngx\_cycle\_t represent](https://forum.nginx.org/read.php?2,220954,220954#msg-220954)**
>
> I am new to nginx and trying to understand its internals. What does ngx\_cycle\_t represent and why does it have ? Appreciate and pointers.

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 9, 2012, 12:31pm UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/2 "2012-01-09T12:31:23Z")

</div>

I am new to nginx and trying to understand its internals. What does  
ngx\_cycle\_t represent?

Appreciate any pointers.

Posted at Nginx Forum:

> **[Re: what is ngx\_cycle\_t represent](https://forum.nginx.org/read.php?2,220954,220955#msg-220955)**
>
> I am new to nginx and trying to understand its internals. What does ngx\_cycle\_t represent and why does it have ? Appreciate and pointers.

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 9, 2012, 1:09pm UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/3 "2012-01-09T13:09:48Z")

</div>

Hi Supportnti,

On 09-01-2012 12:29, supportnti wrote:

> I am new to nginx and trying to understand its internals. What does  
> ngx\_cycle\_t represent and why does it have ?
> 
> Appreciate and pointers.

[http://lxr.evanmiller.org/http/ident?i=ngx\_cycle\_t](http://lxr.evanmiller.org/http/ident?i=ngx_cycle_t)

BR  
Aleks

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 10, 2012, 8:22am UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/4 "2012-01-10T08:22:21Z")

</div>

Hi Aleks

Thanks for the response. Can you please give me a description of what  
ngx\_cycle\_t and what does it represent? I mean is it a request-response  
cycle for each request that comes in? Or is it something else?

Thanks

Posted at Nginx Forum:

> **[Re: what is ngx\_cycle\_t represent](https://forum.nginx.org/read.php?2,220954,220986#msg-220986)**
>
> I am new to nginx and trying to understand its internals. What does ngx\_cycle\_t represent and why does it have ? Appreciate and pointers.

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 10, 2012, 8:47am UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/5 "2012-01-10T08:47:41Z")

</div>

Hello!

On Tue, Jan 10, 2012 at 02:22:08AM -0500, supportnti wrote:

> Hi Aleks
> 
> Thanks for the response. Can you please give me a description of what  
> ngx\_cycle\_t and what does it represent? I mean is it a request-response  
> cycle for each request that comes in? Or is it something else?

It represents global data and configuration of a event loop (that  
is, whole nginx). New cycle is created on a reconfiguration.

Maxim D.

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 10, 2012, 8:31am UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/6 "2012-01-10T08:31:36Z")

</div>

I think it represents the process life cycle.

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 10, 2012, 10:13am UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/7 "2012-01-10T10:13:43Z")

</div>

Hi Maxim,

Thanks for the response. So ngx\_cycle\_t represents global data and  
configuration per event loop. What does ngx\_conf\_t represent? Is it  
related to ngx\_conf\_t? If so, how?

Thanks

Posted at Nginx Forum:

> **[Re: what is ngx\_cycle\_t represent](https://forum.nginx.org/read.php?2,220954,220993#msg-220993)**
>
> I am new to nginx and trying to understand its internals. What does ngx\_cycle\_t represent and why does it have ? Appreciate and pointers.

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 10, 2012, 11:44am UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/8 "2012-01-10T11:44:10Z")

</div>

Hello!

On Tue, Jan 10, 2012 at 04:13:24AM -0500, supportnti wrote:

> Hi Maxim,
> 
> Thanks for the response. So ngx\_cycle\_t represents global data and  
> configuration per event loop. What does ngx\_conf\_t represent? Is it  
> related to ngx\_cycle\_t? If so, how?

The ngx\_conf\_t is a structure used during configuration parsing.  
It holds various related data, e.g. pointer to a new cycle  
structure, current command arguments and so on.

Use the Source, Luke!

Maxim D.

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 10, 2012, 10:18am UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/9 "2012-01-10T10:18:04Z")

</div>

Hi Maxim,

Thanks for the response. So ngx\_cycle\_t represents global data and  
configuration per event loop. What does ngx\_conf\_t represent? Is it  
related to ngx\_cycle\_t? If so, how?

Thanks

Posted at Nginx Forum:

> **[Re: what is ngx\_cycle\_t represent](https://forum.nginx.org/read.php?2,220954,220994#msg-220994)**
>
> I am new to nginx and trying to understand its internals. What does ngx\_cycle\_t represent and why does it have ? Appreciate and pointers.

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 20, 2012, 11:54am UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/10 "2012-01-20T11:54:41Z")

</div>

Thanks Obi-Wan!

I am going thru the source as we speak and would appreciate a helping  
hand!

I can across “NGINX” environment variable in the function  
“ngx\_add\_inherited\_sockets”. What does the NGINX variable represent? And  
what does the function do?

Appreciate your response.

Posted at Nginx Forum:

> **[Re: what is ngx\_cycle\_t represent](https://forum.nginx.org/read.php?2,220954,221473#msg-221473)**
>
> I am new to nginx and trying to understand its internals. What does ngx\_cycle\_t represent and why does it have ? Appreciate and pointers.

---

<div class="post-metadata">

**Author:** ![supportnti](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/0ea827/32.png) [@supportnti](https://www.ruby-forum.com/u/supportnti)\
**Post date:** [January 20, 2012, 2:20pm UTC](https://www.ruby-forum.com/t/what-is-ngx-cycle-t-represent/215580/11 "2012-01-20T14:20:56Z")

</div>

Hello!

On Fri, Jan 20, 2012 at 05:54:01AM -0500, supportnti wrote:

> Thanks Obi-Wan!
> 
> I am going thru the source as we speak and would appreciate a helping  
> hand!
> 
> I can across “NGINX” environment variable in the function  
> “ngx\_add\_inherited\_sockets”. What does the NGINX variable represent? And  
> what does the function do?

The “NGINX” environment variable is used to pass listening sockets  
from an old master process to a new one during binary upgrade  
procedure. (Or, more strictly, it holds numbers of file  
descriptors. Sockets remain opened across execve() call, but  
new process needs to know their numbers.)

The ngx\_add\_inherited\_sockets() function parses the environment  
variable in question and adds sockets to the list of listening  
sockets.

Maxim D.
