1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fun with EC2 Spot Instances

Discussion in 'Black Hat SEO' started by riemann, Apr 16, 2012.

  1. riemann

    riemann Newbie

    Joined:
    Apr 14, 2012
    Messages:
    18
    Likes Received:
    9
    Hey guys,


    I just thought I would share with you some fun I recently had with spot instances, with some code that you can use if you want.




    So our fav cloud srvc provider typically offers micro spot instances for $0.006/hr. The cheap rate is because it's unused capacity and therefore unguaranteed. So it's fine for a service that doesn't need to be 9's reliable, such as this story:


    A friend wanted to win a "Voting" contest, and the only thing that protected it was uniquing IP addresses on the votes. So I summoned up a cluster of spot instances, ssh'd into them and curl'd the contest link (yes, you literally _just_ had to click the link... this type of systems architecture is common, as great programming ability is rare.). I used different User-Agents with my curl, combining Mac, Linux, and Windows OS's with Chrome, Firefox & Safari

    /E3LAT6C8 on pastebin daught calm.

    Enjoy




    BTW, I I welcome lots of code critiques... A lot of this logic can be improved. This particular code also leveraged non-spot instances, so beware. YMMV and all that.




    And, any nubs that want, ask me questions! I need to make my postcount 15 so I can PM about some of my purchases in the forums ;p stupid rule, but i mean, benefits the community... i hope.


    Anyway, if you guys think this kind of thing is cool, post your other ideas in the thread!
     
    • Thanks Thanks x 5
    Last edited: Apr 16, 2012
  2. akany

    akany Registered Member

    Joined:
    Feb 24, 2008
    Messages:
    85
    Likes Received:
    394
    Occupation:
    Webmaster
    Location:
    WWW
    How many votes where you able to generate (ip wise)?
     
  3. riemann

    riemann Newbie

    Joined:
    Apr 14, 2012
    Messages:
    18
    Likes Received:
    9
    20,000
     
    • Thanks Thanks x 1
  4. riemann

    riemann Newbie

    Joined:
    Apr 14, 2012
    Messages:
    18
    Likes Received:
    9
    happy to take all the time in the world, what do you understand about it?
     
  5. BreakAllTheClocks

    BreakAllTheClocks Regular Member

    Joined:
    Apr 23, 2010
    Messages:
    421
    Likes Received:
    242
    They have around 1.2 million public IPs for the US instances now, with about half in the 23.20.0.0/14 and 107.20.0.0/14 ranges. They update the list in the dev forum every so often. Also I'm not sure if the full range is available to micro instances.

    How many ec2 hours did they end up billing you for?
     
    • Thanks Thanks x 2
  6. riemann

    riemann Newbie

    Joined:
    Apr 14, 2012
    Messages:
    18
    Likes Received:
    9
    My bill came out to around $200. But initially, I was using regular micro instances, not spot instances, so it was more expensive. I called them up to complain so it was actually free.
    An improved version of my script would track the bill, client-side. And only use micro spots, basically being $0.006/unique ip.

    There are other service providers, like digital ocean - they are releasing a new api this week - who operate at $0.007/hr and dont bill you for partial hours...
     
  7. riemann

    riemann Newbie

    Joined:
    Apr 14, 2012
    Messages:
    18
    Likes Received:
    9
    Alright, guess this post isn't as popular as I thought it would be, cheers!
     
  8. riemann

    riemann Newbie

    Joined:
    Apr 14, 2012
    Messages:
    18
    Likes Received:
    9
    Anyone have any ideas how I could repurpose the code base for SEO? :)
     
  9. nemsis

    nemsis Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 27, 2009
    Messages:
    173
    Likes Received:
    283
    I didn't know you could get 20.000 ips for 200$, this is awesome and it gives a lot of ideas.
     
  10. sipser

    sipser Newbie

    Joined:
    Feb 4, 2008
    Messages:
    43
    Likes Received:
    18
    That's a pretty awesome idea, I didn't know you could get them so easily. Thanks for sharing.
     
  11. indianbill007

    indianbill007 Jr. VIP Jr. VIP

    Joined:
    Jan 8, 2010
    Messages:
    4,813
    Likes Received:
    4,051
    Occupation:
    Making Money when the world is sleeping
    Location:
    Menlo Park - Next to Zuck