Splitting traffic from two processes in docker container

Hi folks,

I have two processes (yes I know it is not recommended) running inside a docker container.
I need to send traffic from one process to one gateway and the traffic from the second process
to another gateway.

Has anyone successfully accomplished this?

This would have been easy using cgroups except that traffic from containers do not carry their classid
across namespaces.

Any other ideas on how to accomplish this ?

thanks,
Farhad