Single Blog

Use Case : Design openstack networking to meet inhouse email marketing server

Note: This post will cover info more about openstack networking configuration assuming customer already have an email marketing server.

Background:

At present email is playing a vital role in this communication world, so when we need to send emails we may not considering to have our own email setup rather we use public free email providers like Gmail/Hotmail/Yahoo..etc.; but when we need to send bulk emails for any of our promotion or marketing activity even then can we use this free email providers ? It is completely depends up on what is the number we are referring the term “bulk” !

For some people they may have requirement to send emails 10’s , 100’s , for others may be 1000’s it all depends on how big is our lead list/source, So for all our needs we may not be able to use free email providers, here is the comprehensive list of email providers and their limitations.

For our bulk email requirements we may choose any marketing agency our we may out SMTP service providers , rather if we want to build our own email server for marketing purpose, we may feel what is difference between general email server and marketing email server, In general regular email setup is easy by using Microsoft exchange or even we can opensource sendmail to setup but for marketing email server need little more specific config, because while you are sending 1000’s of email at same time from same public IP then there is lot of chance to become your public IP black listed then most of the email scanners will mark your email as spam. and we know how many people read spam emails 👶

Now we know why most of our inboxes have lot of spam ✋

Solution Overview

For one of my Techclyde (Where I am working) customer who is into Digital marketing services, where their existing digital marketing Applications and email servers were in their our private datacenter powered by VMware, to align with their cloud roadmap and other factors (open secret “cost”) Customer decided to migrate to private cloud powered by Openstack.

Techclyde had involved in in its own delivery model to provide cutting edge solution and services to the customer.

After successful migration then customer had a new requirement for their new business line which is email marketing, then customer requested us to evaluate possibilities to set up email marketing server with all the best practices, we were able to cover all the required best practices apart from the requirement to have multiple public IP address for single instance.

This is where we have given different solutions for our customer:

As we know in openstack we cannot directly assign multiple floating IP’s to single interface.

Reason :Floating ip addresses are implemented as NAT rules on the neutron router, and it doesn’t make sense to have multiple NAT rules with the same fixed ip address but different floating addresses.

So we have to add another fixed ip to our instance to assign other floating IP, even here to have isolated environment from existing applications we have created separate project in openstack and created multiple private networks in it and associated each one of the private IP to an instance, so that our instance will have different private networks associated with different floating IP’s. By this now our customer is rocking on their new business line with effective cost along with more security and scalability.

Technical Details:

Who are all interested on technical details about How? please find below:

Step 1: Launch your instance with one private IP and one Floating IP using below commands

nova boot –image centos-6 –flavor m1.small –nic net-id=3ff9b098-e732-1908-f98t-dgh8f16123456 –key-name lars emailserver

Create Floating IP using below command

neutron floatingip-create public 

(above public is referring your network name you can get the same by using neutron net-list)

Add floating ip to an instance

neutron floatingip-create public

nova add-floating-ip emailserver 124.123.65.4

Step 2:  Now Create one more floating IP but you cannot directly assign to same interface as mentioned reason above.

Add another fixed IP 
nova add-fixed-ip emailserver 3ff9b903-
e921-4752-a26f-cba8f1433992


Unfortunately, here our instance isn’t going to know about this new address; DHCP will only pick up a single address , and with two fixed addresses, you don’t know which address you’re going to get by default. Because that will cause all kinds of grief, you’re going to have to configure networking statically on your host.

So how we add here depends on which OS distribution we are using as instance:

For Ubuntu:

$ cd /etc/network/interfaces.d
$ cp eth0.cfg eth1.cfg

Now in the editor of your choice, change any references of eth0 to eth1 in the new eth1.cfg file.  There should only be a couple. Then bring up eth1:

$ sudo ifup eth1

Now the routing can be done via IP rules.

# 10.10.2.1 = gateway for the secondary interface
# 10.10.2.11 = ip address for the secondary interface eth1
$ ip route add default via 10.10.2.1 dev eth1 table 10 
$ ip rule add from 10.10.2.11 table 10

Step 3: Now we can associate the second floating ip to second interface

nova add-floating-ip --fixed-address 10.0.0.5 emailserver 103.46.74.85

Now we should be able to ping and access the instance from both Floating IP's




Hope this post helped.

Comments (1)

Post a Comment