1

Scenario:

Client buys our analytics services and includes our analytics SDK in his mobile app. Users who download the app will start sending us lots of data. When the client stops paying for our analytics all the data is still coming and it affects our bandwidth and clutters our request handling.

We can easily stop all SDK from sending data but it will be final, so if the client decides to renew the service he will have to re-upload SDK again which takes time and effort on his part. We can also lower the amount of calls to 1 per 24h but with lots of clients that is till a lot of useless data calls.

Is there a way to design server architecture so that when a client stops paying for our services, all incoming calls from his apps will be excluded and will not effect the incoming server bandwidth and request handling?

Some cumbersome solutions: provide each client with a specific subdomain, or port. Then remove the subdomain or port after he stops using the service (limited and still affects request handling)

Thanks for help.

Cyprian
  • 165
  • 1
  • 1
  • 5

2 Answers2

2

I would use DNS for this.

If your business domain is wemonitorstuffforyou.com and the subscribing clients app is called subscribingclientsapp.

Configure a subdomain called subscribingclientsapp.wemonitorstuffforyou.com for the clients app to use when sending your data.

In the future if that client fails to continue with your service, you can redirect the subdomain to point elsewhere. If the client decides in the future to restart your services, you simply reconfigure the subdomain pointing.

  • 2
    +1 Simple, efficient, and scales. – daemonofchaos Oct 02 '13 at 02:59
  • @edg3e Isn't there a limit of the number of subdomains one can create? I know Rackspace limits that to 500 but dunno if its just them or if there is just the limit everywhere. – Cyprian Oct 02 '13 at 23:52
  • @Cyprian This is completely dependent on the DNS server, but it's certainly beyond 500. BIND's limit is 16777216 and Microsoft DNS go to 20k. Some domain registrars attempt to charge for subdomains but there is nothing technically stopping you from pointing your name server (NS) entries to another name server. Personally I always register my names with Go Daddy but almost immediately repoint my name servers to AWS Route 53 or Linode. I did a search either way and found an [article](http://serverfault.com/questions/65920/how-many-sub-domains-can-there-be-at-most) that I hope helps you further – spaceshipdev Oct 03 '13 at 17:14
  • @edg3e thats super helpful. Thank you for investigating it for me. – Cyprian Oct 06 '13 at 04:50
  • Glad I could help, good luck with your project. – spaceshipdev Oct 06 '13 at 23:32
0

If there is any customer specific value in URIs, you can filter and reject unwanted requests at firewall level using iptables.

dirigeant
  • 221
  • 1
  • 4