LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-17-2014, 02:22 AM   #1
shahzaibcb
LQ Newbie
 
Registered: Dec 2013
Posts: 28

Rep: Reputation: Disabled
Local Caching Server !!


We're using video streaming website and want to cache mp4 files on local caching server to save the bandwidth. We have two servers, one in US and one is in our country's local ISP(Caching Server).

Request first goes to Main-server and it checks the client ip using nginx geo module in order to decide routing. Now we want to route any ip coming from our local ISP towards the caching server. Currently, we're using nginx geo module on main server located in US to check if the coming request is from the ip 1.2.3.4 and direct it to the local caching server.

Our ISP provided us with pools i.e 10.0.0.0/8 to route these ips on their local caching server.

The problem occurs now that we'll have to get the ip pools from our local ISP each time whenever they add the new clients to their network.

Is there a way to detect new ip pools automatically using some services maybe like BGP ? I've no idea about BGP but just heard from my friend.

If yes, how i am going to work with BGP ? Currently we're using nginx on both our servers.

Help will be highly appreciated.
 
Old 06-17-2014, 03:23 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,889

Rep: Reputation: 163Reputation: 163
How does nginx decide route, based on routing table in kernel or configuration in nginx?
 
Old 06-18-2014, 12:53 AM   #3
shahzaibcb
LQ Newbie
 
Registered: Dec 2013
Posts: 28

Original Poster
Rep: Reputation: Disabled
>>How does nginx decide route, based on routing table in kernel or configuration in nginx?
Its nginx geo module, which supports CIDR notation to route that specific ip prefix towards the local caching server and rest will be server from the main server. I configured this module on Main Server because request first goes there, so nginx checks if the ip is 1.2.3.4 and it is added in geo {} so it'll route that ip towards the local caching server using proxy_pass directive of nginx.

http://nginx.org/en/docs/http/ngx_http_geo_module.html
 
Old 06-18-2014, 07:07 AM   #4
tairoylance112
LQ Newbie
 
Registered: Jun 2014
Posts: 4

Rep: Reputation: 0
The server stores objects in serialized form in the cache. When a cache client requests an object from the cache, the server sends it to the client over the network. The cache client then deserializes the object for use by the client application. To speed up the process of retrieving an object, enable local cache. For more information about enabling local cache, see Enable Windows Server AppFabric Local Cache or Enable Windows Server AppFabric Local Cache (XML).
 
Old 06-19-2014, 03:33 PM   #5
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,889

Rep: Reputation: 163Reputation: 163
The BGP is too big, normally it is used on backbone, not end user. You can use OSPF to get updated routing table. And then a code or script add these change into geo {}.
 
Old 06-20-2014, 01:43 AM   #6
shahzaibcb
LQ Newbie
 
Registered: Dec 2013
Posts: 28

Original Poster
Rep: Reputation: Disabled
Can following script help me for fetching the prefixs from ISP router (via ASn of ISP) ?

https://code.google.com/p/bgpsimple/wiki/README

I'll add this script to our local caching server located in ISP and fetch the ISP routing table feed using this script ? And than will sync this script to my webserver.
 
Old 06-20-2014, 03:36 PM   #7
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,889

Rep: Reputation: 163Reputation: 163
I might be wrong. The script look like update entire routing table through BGP. Yes, you can use the script to update entire routing table in geo {}. If only doing different each time, it is better.
 
  


Reply

Tags
cache, centos, linux, nginx


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to enable local file caching for NFS share on Linux LXer Syndicated Linux News 0 10-06-2013 03:10 AM
DNS caching server on local network rajcan Linux - Software 7 07-02-2011 02:13 PM
Strange results with local BIND caching name-server pixel_surgeon Linux - Server 2 04-04-2009 10:05 AM
Caching DNS server error (lame server resolving) Iggyboo Linux - Networking 1 02-24-2005 04:43 AM
Local caching only DNS takes a long time to resolve essdeeay Linux - Networking 4 08-20-2004 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration