Systems Research
RDMA Enabled Apache (mod_rdma)
Principal Investigator: Dennis Dalessandro (OSC) & Pete Wyckoff (OSC)
3. Apache Hooks - Event processing
To interface with Apache, mod_rdma takes advantage of the "hook" infrastructure.
Basically what happens is Apache registers the hooks. When it spawns processes
(not threads) it calls the child init hook, for each one, which does some initialization
related to RDMA processing. Then when a client connects (ordinary HTTP) the pre-connection
handler gets fired, which sets up the output filter chain. As requests come in the server
calls our insert filter routine which examines the headers and extracts information. Once
the server has processes the request, it calls off to our output filter which handles
shipping the data. Once a client disconnects (HTTP), our rdma connection clean up function
runs and tears down the RDMA connection and frees resources.
Hook Details
rdma_register_hooks()
-hooks on rdma_post_config
-hooks on rdma_child_init
-hooks on rdma_pre_connection_handle
-hooks on rdma_insert_filter
-hooks on rdma_output_filter
rdma_post_config()
- doesn't really do anything yet but harmless (for SSL really)
rdma_child_init()
- gets called at start up by each process before starting
any threads
-Do any RDMA related initializations
rdma_pre_connection_handler()
- gets called at start of each new HTTP connection
-This is what attaches the output filter to the filter chain
-Registers a cleanup handler (rdma_connection_cleanup)
rdma_connection_cleanup()
- Do any clean up or tear down necessary per connection
rdma_insert_filter() - glues our filters onto the chain to be processed
-Check HTTP headers and extract information about file transfer
-Make RDMA connection if not done so already
rdma_output_filter() - this is where we actually ship he
-When a bucket (data segment) comes along that needs to be shipped
-send it with RDMA hanging onto the headers
ship_file() - send data residing in an open file (FD)
ship_heap() - send data residing in a buffer (PHP content)
ship_transient() - really only needed for SSL support
-if no data to send then handle EOS
finish_eos_server_writes() - reap all completions and pass on
bucket brigade
finish_eos_client_reads() - reap all completions and pass on
bucket brigade
HOME
NEXT
|