유닉스 시스템에서 효율적인 CGI 게이트웨이

An Efficient CGI Gateway in the UNIX System

  • 이형봉 (호남대학교 정보통신공학부)
  • 발행 : 2004.02.01

초록

웹 서비스 환경에서 시시각각으로 변화하는 최신 정보나 조건에 맞는 정보를 다루기 위해서는 고정된 문서 파일 대신 실행 가능한 프로그램 파일을 지정함으로써 그 프로그램의 출력결과를 문서로 받을 수 있는 CGI 방식이 필요하다. 그런데 애초에 고안된 CGI 방식은 사용자의 요청이 있을 때마다 서비스 프로그램이 새로 생성되어야 하는 구조이기 때문에 여러 가지 성능상의 문제점을 내포하고 있다. 이를 해결하기 위해 서비스 프로그램 즉, CGI 게이트웨이의 전체 혹은 일부를 디몬 형태로 상주시키는 다양한 방안들이 제안되어 왔다. 그러나 그들 각각은 상호 배타적인 장단점을 가지기 때문에 개발자들은 어떤 방식을 선택해야 할지를 판단할 때 혼란스럽다. 이 논문에서는 유닉스 계열의 시스템에서 게이트웨이의 주요 부분을 디몬으로 상주시키고 매번 생성되는 작은 부분으로부터 통신 채널 자체를 넘겨받는 SendFD 방식을 제안하고, 그 효용성을 실질적인 웹 환경에서 검증하였다. 제안된 방식은 기존의 소켓 파이프 방식 대비 약 3%의 성능향상을 보였다.

To get changing data or retrieved information in a web service environment, we need the CGI method in which we designate an executable file and receive the output of the executable file as a document. But the original CGI method has some performance pitfalls caused by the native condition that a process for the requested executable file should be created every time it is requested. Several approaches that make the process as a daemon wholly or partly have been made to solve those problems and they have exclusive strength and weakness. So, many developers are confused when they have to choose which of the CGI methods. We proposed an efficient CGI gateway design called SendFD that the main part of CGI gateway was separated as a daemon and taken over the communication channel by the other small part forked whenever it was requested. Then we testified the efficiency of SendFD styled CGI gateway in real web service environment and it showed about 3% performance improvement compared to the conventional socket pipe method.

키워드

참고문헌

  1. RFC1521, RFC2522, 'MIME(Multipurpose Internet Mail Extension),' ftp://ftp.rfc-editor.org/in-notes/rfc1521.txt
  2. World Wide Web Consortium, 'HTTP-Hypertext Transfer Protocol,' http://www.w3.org/protocols/.
  3. World Wide Web Consortium, 'CGI: Common Gate way Interface,' http://www.w3.org/hypertext/wwwCGI
  4. A. Iyengar, E. Nahum, A. Shaikh and R. Tewari, 'Enhancing Web Performance,' IPIP World Computer Congress, Montreal, Canada, 2002
  5. E. Nahum, T. Barzilai and D. Kandlur, 'Performance Issues in WWW Servers,' IEEE/ACM Transactions on Networking, 10(2):2-11, 2002 https://doi.org/10.1109/90.986497
  6. P. Joubert, Robert B. King, Rich Neves and Mark Russinovich, John M.Tracey, 'High-Performance Memory-Based Web Servers: Kernel and User-space Performance,' Proceedings of the USENIX Annual Technical Conference, Boston, MA, 2001
  7. A. Iyengar, J. Challenger, D. Dias and P. Dantzig, 'High-Performance Web Site Design Techniques,' IEEE Internet Computing, 4(2), 2000 https://doi.org/10.1109/4236.832942
  8. 정진국, 낭종호, 박성용, '다중 처리기 기반 웹 서버 구조의 실험적 성능 분석', 정보과학회 논문지: 정보통신 제28권 제1호, pp.22-36, 2001
  9. M.N. Mills III, L.Krueger, W.Chiu, N.Halim, J.L.Hellerstein and M.S.Squillante, 'Metrics for Performance Tuing of Web-Based Appli cations,' The computer Measurement Group, 2000
  10. 김수정, 백승구, 김종근, '웹 정보시스템의 서비스 성능 향상을 위한 부하균형 모델 제안', 정보처리학회 논문지 제6권 제11호, pp.3179-3189, 1999
  11. James C. Hu, S. Mungee and D. C. Schmidt, 'Techniques for Developing and Measuring High Performance Web servers over High Speed Networks,' Inforcom'98, 1998 https://doi.org/10.1109/INFCOM.1998.662936
  12. Open Market, 'FastCGI,' http://www.fastcgi.com
  13. 이기용, 곽태영, 서정현, 김명호, '대규모 온라인 검색요구를 효율적으로 처리하기 위한 KRISTAL-II 웹 게이트웨이의 설계 및 구현', 정보과학회논문지:컴퓨팅의 실제 제6권 제5호, pp.496-504, 2000
  14. Oracle Education Part, Oracle8 Administra tion Volume 1, Oracle Press, p.1-8, 1998
  15. U. Vahalia, UNIX Internals-the new frontiers, Prentice Hall, p.241, 1996
  16. W. R. Steven, Advanced Programming in the $UNIX{\circledR}$ Environment, Addison Wesley, p.479, 1992