Vicompress Path Flow

Vicompress acts as a forward proxy (with dns). No caching and no gzipping is done.

main()
[vicompress.c]
|
Read the configuration from vicompress.conf
config_init()
[config.c]
|
Listen on the IP address/port
start_listening()
[vicompress.c]
|
sockets_checkevents()
[sockets.c]
|
sockets_checklisten()
[sockets.c]
|
Accept a new client
do_accept()
[sockets.c]
|
conn_accept_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the http request
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
check_out_queue()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_request_cb()
[vicompress.c]
|
Parse the http request
http_parse_request()
[http.c]
|
Check if request is cachable
request_is_cachable()
[http.c]
|
Check if browser supports gzip compression
request_acceptgzip()
[http.c]
|
conn_read_request_done()
[vicompress.c]
|
See if the request is cached (its not)
cache_get()
[cache.c]
|
conn_read_server_reply()
[vicompress.c]
|
sockets_dnslookup()
[sockets.c]
|
Do a DNS lookup of the hostname
dns_lookup()
[dns.c]
|
sockets_checkevents()
[sockets.c]
|
check_dns()
[sockets.c]
|
dns_getresults()
[dns.c]
|
conn_dnslookup_cb()
[vicompress.c]
|
conn_connect_to_server()
[vicompress.c]
|
sockets_connect()
[sockets.c]
|
Connect to the origin server
do_connect()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_connect_callback()
[sockets.c]
|
conn_connect_cb()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the http request to the origin server
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_request_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the http reply
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_reply_cb()
[vicompress.c]
|
Parse the http reply
http_parse_reply()
[http.c]
|
Check if reply is cachable
reply_is_cachable()
[http.c]
|
Check if reply can be gzipped
reply_cangzip()
[http.c]
|
Check whether reply should be gzipped/cached
conn_read_reply_done()
[vicompress.c]
|
conn_write_server_reply()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the http reply back to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_reply_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the content from the origin server
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_server_body_cb()
[vicompress.c]
|
conn_write_server_body()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the content to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_server_body_cb()
[vicompress.c]
|
Finished writing content to client
conn_write_server_reply_done()
[vicompress.c]
|
logaccess()
[vicompress.c]
|
Write the request to the accesslog
accesslog_write()
[log.c]
|
conn_close()
[vicompress.c]
|

    Vicompress load balances among several backend webservers. No caching and no gzipping is done.

main()
[vicompress.c]
|
Read the configuration from vicompress.conf
config_init()
[config.c]
|
Listen on the IP address/port
start_listening()
[vicompress.c]
|
sockets_checkevents()
[sockets.c]
|
sockets_checklisten()
[sockets.c]
|
Accept a new client
do_accept()
[sockets.c]
|
conn_accept_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the http request
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
check_out_queue()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_request_cb()
[vicompress.c]
|
Parse the http request
http_parse_request()
[http.c]
|
Check if request is cachable
request_is_cachable()
[http.c]
|
Check if browser supports gzip compression
request_acceptgzip()
[http.c]
|
conn_read_request_done()
[vicompress.c]
|
See if the request is cached (its not)
cache_get()
[cache.c]
|
conn_read_server_reply()
[vicompress.c]
|
Choose the backend webserver to use.
loadbalancer_get_id()
[loadbalancer.c]
|
conn_connect_to_server()
[vicompress.c]
|
sockets_connect()
[sockets.c]
|
Connect to the origin server
do_connect()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_connect_callback()
[sockets.c]
|
conn_connect_cb()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the http request to the origin server
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_request_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the http reply
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_reply_cb()
[vicompress.c]
|
Parse the http reply
http_parse_reply()
[http.c]
|
Check if reply is cachable
reply_is_cachable()
[http.c]
|
Check if reply can be gzipped
reply_cangzip()
[http.c]
|
Check whether reply should be gzipped/cached
conn_read_reply_done()
[vicompress.c]
|
conn_write_server_reply()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the http reply back to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_reply_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the content from the origin server
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_server_body_cb()
[vicompress.c]
|
conn_write_server_body()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the content to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_server_body_cb()
[vicompress.c]
|
Finished writing content to client
conn_write_server_reply_done()
[vicompress.c]
|
logaccess()
[vicompress.c]
|
Write the request to the accesslog
accesslog_write()
[log.c]
|
conn_close()
[vicompress.c]
|

    Vicompress caches the reply from the origin server. No gzipping is done.

main()
[vicompress.c]
|
Read the configuration from vicompress.conf
config_init()
[config.c]
|
Listen on the IP address/port
start_listening()
[vicompress.c]
|
sockets_checkevents()
[sockets.c]
|
sockets_checklisten()
[sockets.c]
|
Accept a new client
do_accept()
[sockets.c]
|
conn_accept_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the http request
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
check_out_queue()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_request_cb()
[vicompress.c]
|
Parse the http request
http_parse_request()
[http.c]
|
Check if request is cachable
request_is_cachable()
[http.c]
|
Check if browser supports gzip compression
request_acceptgzip()
[http.c]
|
conn_read_request_done()
[vicompress.c]
|
See if the request is cached (its not)
cache_get()
[cache.c]
|
conn_read_server_reply()
[vicompress.c]
|
sockets_dnslookup()
[sockets.c]
|
Do a DNS lookup of the hostname
dns_lookup()
[dns.c]
|
sockets_checkevents()
[sockets.c]
|
check_dns()
[sockets.c]
|
dns_getresults()
[dns.c]
|
conn_dnslookup_cb()
[vicompress.c]
|
conn_connect_to_server()
[vicompress.c]
|
sockets_connect()
[sockets.c]
|
Connect to the origin server
do_connect()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_connect_callback()
[sockets.c]
|
conn_connect_cb()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the http request to the origin server
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_request_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the http reply
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_reply_cb()
[vicompress.c]
|
Parse the http reply
http_parse_reply()
[http.c]
|
Check if reply is cachable
reply_is_cachable()
[http.c]
|
Check if reply can be gzipped
reply_cangzip()
[http.c]
|
Check whether reply should be gzipped/cached
conn_read_reply_done()
[vicompress.c]
|
Create a new item for the cache
cache_create()
[cache.c]
|
conn_write_server_reply()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the http reply back to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_reply_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the content from the origin server
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_server_body_cb()
[vicompress.c]
|
conn_write_server_body()
[vicompress.c]
|
Write the content into the cache
cacheditem_write()
[cache.c]
|
sockets_write()
[sockets.c]
|
Write the content to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_server_body_cb()
[vicompress.c]
|
Finished writing content to client
conn_write_server_reply_done()
[vicompress.c]
|
Finished writing content to the cache
cache_create_done()
[cache.c]
|
logaccess()
[vicompress.c]
|
Write the request to the accesslog
accesslog_write()
[log.c]
|
conn_close()
[vicompress.c]
|

    Vicompress gzips the reply data. No caching is done.

main()
[vicompress.c]
|
Read the configuration from vicompress.conf
config_init()
[config.c]
|
Listen on the IP address/port
start_listening()
[vicompress.c]
|
sockets_checkevents()
[sockets.c]
|
sockets_checklisten()
[sockets.c]
|
Accept a new client
do_accept()
[sockets.c]
|
conn_accept_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the http request
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
check_out_queue()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_request_cb()
[vicompress.c]
|
Parse the http request
http_parse_request()
[http.c]
|
Check if request is cachable
request_is_cachable()
[http.c]
|
Check if browser supports gzip compression
request_acceptgzip()
[http.c]
|
conn_read_request_done()
[vicompress.c]
|
See if the request is cached (its not)
cache_get()
[cache.c]
|
conn_read_server_reply()
[vicompress.c]
|
sockets_dnslookup()
[sockets.c]
|
Do a DNS lookup of the hostname
dns_lookup()
[dns.c]
|
sockets_checkevents()
[sockets.c]
|
check_dns()
[sockets.c]
|
dns_getresults()
[dns.c]
|
conn_dnslookup_cb()
[vicompress.c]
|
conn_connect_to_server()
[vicompress.c]
|
sockets_connect()
[sockets.c]
|
Connect to the origin server
do_connect()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_connect_callback()
[sockets.c]
|
conn_connect_cb()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the http request to the origin server
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_request_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the http reply
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_reply_cb()
[vicompress.c]
|
Parse the http reply
http_parse_reply()
[http.c]
|
Check if reply is cachable
reply_is_cachable()
[http.c]
|
Check if reply can be gzipped
reply_cangzip()
[http.c]
|
Check whether reply should be gzipped/cached
conn_read_reply_done()
[vicompress.c]
|
Allocate memory for gzipping the reply content
gzippool_alloc()
[gzipencoder.c]
|
conn_write_server_reply()
[vicompress.c]
|
sockets_write()
[sockets.c]
|
Write the http reply back to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_reply_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the content from the origin server
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_server_body_cb()
[vicompress.c]
|
conn_write_gzippedbody()
[vicompress.c]
|
gzip_add()
[gzipencoder.c]
|
Compress the content read
do_gzip_add()
[gzipencoder.c]
|
conn_check_finished_gzip()
[vicompress.c]
|
gzip_get_finished()
[gzipencoder.c]
|
conn_continue_write_gzippedbody()
[vicompress.c]
|
Flush gzip buffers after reading content
gzip_flush()
[gzipencoder.c]
|
Check if there's compressed content ready
gzip_has_output()
[gzipencoder.c]
|
sockets_write()
[sockets.c]
|
Write the content to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_gzippedbody_cb()
[vicompress.c]
|
Finished writing content to client
conn_write_server_reply_done()
[vicompress.c]
|
Free gzip related memory
gzip_free()
[gzipencoder.c]
|
logaccess()
[vicompress.c]
|
Write the request to the accesslog
accesslog_write()
[log.c]
|
conn_close()
[vicompress.c]
|

    Vicompress sends back a cached reply.

main()
[vicompress.c]
|
Read the configuration from vicompress.conf
config_init()
[config.c]
|
Listen on the IP address/port
start_listening()
[vicompress.c]
|
sockets_checkevents()
[sockets.c]
|
sockets_checklisten()
[sockets.c]
|
Accept a new client
do_accept()
[sockets.c]
|
conn_accept_cb()
[vicompress.c]
|
sockets_read()
[sockets.c]
|
Read the http request
do_read()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
check_out_queue()
[sockets.c]
|
do_read_callback()
[sockets.c]
|
conn_read_request_cb()
[vicompress.c]
|
Parse the http request
http_parse_request()
[http.c]
|
Check if request is cachable
request_is_cachable()
[http.c]
|
Check if browser supports gzip compression
request_acceptgzip()
[http.c]
|
conn_read_request_done()
[vicompress.c]
|
See if the request is cached (it is)
cache_get()
[cache.c]
|
conn_write_cached_reply()
[vicompress.c]
|
Get the http reply header from the cache
cacheditem_httpreply()
[cache.c]
|
sockets_write()
[sockets.c]
|
Write the http reply back to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_cached_reply_cb()
[vicompress.c]
|
conn_read_cached_body()
[vicompress.c]
|
Get the content from the cache
cacheditem_read()
[cache.c]
|
sockets_write()
[sockets.c]
|
Write the content to the client
do_write()
[sockets.c]
|
sockets_checkevents()
[sockets.c]
|
do_write_callback()
[sockets.c]
|
conn_write_cached_body_cb()
[vicompress.c]
|
conn_read_cached_body()
[vicompress.c]
|
Finished writing cached reply to client
conn_write_cached_reply_done()
[vicompress.c]
|
Finished with cached item
cache_close()
[cache.c]
|
logaccess()
[vicompress.c]
|
Write the request to the accesslog
accesslog_write()
[log.c]
|
conn_close()
[vicompress.c]
|