python - Select outgoing IP from django? -


if we're running on host can have multiple ip addresses (it's ec2 elastic ips), possible select django outgoing ip address use?

even if random choice it'd fine.

edit: apologies, not clear above. requests new outgoing calls made within python, not response client request - happy go down whatever pipe came in on.

i guess webapp responses, server going use 1 connection socket, if request came ip address x, response sent in same tcp connection , originate same address x, though host has addresses y , z.

on other hand, if application creates tcp connection during operation, possible bind socket on of host's ip addresses want. if you're using python's socket module, can specifying source_address argument in socket.create_connection() call. unfortunately, not higher-level libraries may allow level of control.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -