3

I am a newbie to Intel DPDK. I am planning to write an http web server.

Can it be implemented using the following logic using DPDK ?

  1. Get the packets and send it to Worker Logical Cores.
  2. A Worker Logical Core build 'http reuqest' sent by the client, using the incoming packets.
  3. Process the 'http reuest' in the Worker Logical Core and produce an 'http response'.
  4. Create packets for the 'http response' and dispatch them to output software rings.

I am not sure whether the above is feasible or not.

Is it possible to write a web server using Intel DPDK?

HPCM
  • 31
  • 1
  • 4
  • You need to implement a TCP/IP stack first to retrieve HTTP messages, no? Maybe https://github.com/opendp/dpdk-ans this will get that working. – Unmanned Player Nov 24 '16 at 02:58

2 Answers2

2

It is lot of work since you'll need a TCP/IP stack on top of the DPDK. Even once you'll have ported a TCP/IP stack on top of DPDK (or reusing a port from an OS), you won't have the performance because it is easy to write C code that runs, but writting a TCP/IP stack that sustains good performances, it is a very difficult development.

You can try http://www.6wind.com/6windgate-performance/tcp-termination/ : they do not provide a HTTP server, but they provide a L7 like TCP socket support to build the fastest HTTP servers.

Vincent
  • 41
  • 2
2

Yes, its possible to build a Web Server using DPDK. You could either use a KNI interface provided by DPDK. All packets received on a KNI interfaces are still routed through the kernel network stack -- however, and heres the catch, this is still faster than directly receiving packets from the kernel (requires multiple copies). With DPDK you could still ping cores to RX and different lcores to TX. You could then instruct your OS not to use these lcores for anything else. So you really have dedicated lcores for packet TX and RX. Ensure that Tx and RX lcores lie on different CPU sockets.

More information at: http://dpdk.org/doc/guides/sample_app_ug/kernel_nic_interface.html

Abhishek
  • 275
  • 7
  • 18
  • Hi Abhishek, Why is it necessary that Tx and Rx lcore should lie on different CPU socket, what will happen if they are on same CPU socket ? – Subbu Aug 23 '16 at 18:36