What is the difference between a restart and a graceful restart of a web server?
During a normal restart, the server is stopped and then started, causing some requests to be lost. A graceful restart allows Apache children to continue to serve their current requests until they can be replaced with children running the new configuration
[root@node1 ~]# ps -aux |grep http
root 28853 0.1 0.1 221948 4988 ? Ss 13:07 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28939 0.0 0.0 221948 2952 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28940 0.0 0.0 221948 2952 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28941 0.0 0.0 221948 2952 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28942 0.0 0.0 221948 2952 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28943 0.0 0.0 221948 2956 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
root 28946 0.0 0.0 112660 972 pts/0 S+ 13:08 0:00 grep –color=auto http
[root@node1 ~]# service httpd graceful
[root@node1 ~]# ps -aux |grep http
root 28853 0.1 0.1 221948 4988 ? Ss 13:07 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28964 0.0 0.0 221948 2952 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28965 0.0 0.0 221948 2952 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28966 0.0 0.0 221948 2952 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28967 0.0 0.0 221948 2952 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
apache 28968 0.0 0.0 221948 2952 ? S 13:08 0:00 /usr/sbin/httpd -DFOREGROUND
root 28970 0.0 0.0 112660 972 pts/0 R+ 13:08 0:00 grep –color=auto http
[root@node1 ~]# service httpd restart
Redirecting to /bin/systemctl restart httpd.service
[root@node1 ~]# ps -aux |grep http
root 28999 1.5 0.1 221948 4952 ? Ss 13:09 0:00 /usr/sbin/httpd -DFOREGROUND
apache 29000 0.0 0.0 221948 2964 ? S 13:09 0:00 /usr/sbin/httpd -DFOREGROUND
apache 29001 0.0 0.0 221948 2964 ? S 13:09 0:00 /usr/sbin/httpd -DFOREGROUND
apache 29002 0.0 0.0 221948 2964 ? S 13:09 0:00 /usr/sbin/httpd -DFOREGROUND
apache 29003 0.0 0.0 221948 2964 ? S 13:09 0:00 /usr/sbin/httpd -DFOREGROUND
apache 29004 0.0 0.0 221948 2964 ? S 13:09 0:00 /usr/sbin/httpd -DFOREGROUND
root 29006 0.0 0.0 112660 968 pts/0 S+ 13:09 0:00 grep –color=auto http
