astartsky / url-balancer
There is no license information available for the latest version (1.1.3) of this package.
1.1.3
2016-02-28 13:03 UTC
Requires
- php: >5.3
README
Url balancer is a lightweight library for domain dynamic allocation.
- Silex support
- Extendable strategies
- Extendable optional caching
Usage
$urlBalancer = new \Astartsky\UrlBalancer\UrlBalancer();
$urlBalancer->setStrategy(new \Astartsky\UrlBalancer\Strategy\HashStrategy());
$urlBalancer->addBucket(new \Astartsky\UrlBalancer\Domain("static1.myawesomesite.com"));
$urlBalancer->addBucket(new \Astartsky\UrlBalancer\Domain("static2.myawesomesite.com"));
$urlBalancer->addBucket(new \Astartsky\UrlBalancer\Domain("static3.myawesomesite.com"));
$url = $urlBalancer->getUrl("/images/my_impressive_content.png");
License
MIT