<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><font size="2">First time here, was looking at supporting http protocol (using nginx) over our custom zeromq server talking protocol buf. Read the excelled tutorial by Evan and was also looking at few similar plugins to get an idea.</font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><font size="2"><br></font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;
background-color: transparent; font-style: normal;"><font size="2">One confusion I have is, I see some plugins like memcache/redis ones where the http request and response parsing is done by upstream handler modules, while I also see some modules like <a href="https://github.com/chaoslawful/drizzle-nginx-module">https://github.com/chaoslawful/drizzle-nginx-module</a> where the request/response handling is done by peer.init_upstream class of functions. My typical flow would : parse http request -> convert to protobuf request object -> send to zmq server -> {nginx event notification} -> convert protobuf response back to http response -> respond to client.</font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family:
HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><font size="2">I can imagine doing all the request/response handling during connection send/receive part or by registering create_request,process_header , filter hooks. Is there any guideline on which is the right approach. (I have seen <a href="https://github.com/FRiCKLE/ngx_zeromq">https://github.com/FRiCKLE/ngx_zeromq</a> , not exactly what I want)</font></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><font size="2">Thanks</font><br></div><div style="color: rgb(0, 0, 0); font-size: 16px;
font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; background-color: transparent; font-style: normal;"><font size="2">Jai</font><br></div></div></body></html>