News for hackers. Stuff that matters.
Re:Youporn.com is now a 100% Redis Site by antirez on Thursday February 16, 2012 @04:13AM (#3597957)
That's porn for database geeks: 100 million pageviews per day, 300k requests per second against Redis.

The way they use MySQL is also interesting IMHO: they populate a relational database in order to be able to build new indexes in the Redis side, using the relational DB for the stuff it is best at, generating new "views" of the data easily.

(Relational DBs are also good to do a zillion more things of course.)

Re:Youporn.com is now a 100% Redis Site by Mikushi on Thursday February 16, 2012 @05:22AM (#3598079)
Yep, i've been a Redis lobbyist for over a year at this company (i use to be the Lead Software Engineer on Youporn/Pornhub), and i'm really happy to see them using it and using it properly.
Re:Youporn.com is now a 100% Redis Site by hello_moto on Thursday February 16, 2012 @01:37PM (#3600021)
How do you store the videos?

I remember seeing YouTube storing videos using some sort of specialized hardware from NetApp or something and they still got hit by the limitation of Linux filesystem (number of nodes?)

Re:Youporn.com is now a 100% Redis Site by alanh on Thursday February 16, 2012 @06:27PM (#3601229)
It was number of files in a directory, and those were the garage days.
Re:Youporn.com is now a 100% Redis Site by badboy on Thursday February 16, 2012 @04:15AM (#3597958)
You know your software is successful when it's used by porn sites :D
Re:Youporn.com is now a 100% Redis Site by pud on Thursday February 16, 2012 @04:19AM (#3597964)
I remember in the 90's having a conversation with my friend. We were discussing Linux vs Windows for web hosting. My friend said "tell me if you can find a single porn site that's hosted on Windows." He was right, I couldn't find any.
Re:Youporn.com is now a 100% Redis Site by traskjd on Thursday February 16, 2012 @04:54PM (#3600840)
They do exist. I run a .NET developer tools company and had a customer purchase our data access products to use with several of their porn sites.

Never did manage to see the final product though!

Re:Youporn.com is now a 100% Redis Site by mahmud on Friday February 17, 2012 @12:53AM (#3602338)
You prude!
Re:Youporn.com is now a 100% Redis Site by wonster on Thursday February 16, 2012 @07:43PM (#3601462)
Worked for one that was at least in the top 5 porn sites back around 1998-99. All Windows servers running IIS and we were using NetApp appliances for storage.
Re:Youporn.com is now a 100% Redis Site by junto on Thursday February 16, 2012 @09:43AM (#3598843)
How long did you spend on this "research" out of interest? :-)
Re:Youporn.com is now a 100% Redis Site by vacri on Thursday February 16, 2012 @08:50PM (#3601655)
Hard to say. The research was done in short bursts.
Re:Youporn.com is now a 100% Redis Site by mhurron on Thursday February 16, 2012 @06:50AM (#3598236)
They do exist. I turned down the chance to interview at one about 6 months ago.
Re:Youporn.com is now a 100% Redis Site by leviathant on Thursday February 16, 2012 @12:23PM (#3599660)
Sure, but IIS in 2011 is a completely different beast than IIS in the 90s.
Re:Youporn.com is now a 100% Redis Site by brettz on Friday February 17, 2012 @12:50AM (#3602335)
Spankwire is alexa top400 and runs in .NET
Re:Youporn.com is now a 100% Redis Site by d3x on Thursday February 16, 2012 @09:56PM (#3601885)
AEBN was and might still be the largest VOD service online and they run Windows or at least they did while I was there.
Re:Youporn.com is now a 100% Redis Site by baby on Thursday February 16, 2012 @10:47PM (#3602026)
But they're unknown.
Re:Youporn.com is now a 100% Redis Site by d3x on Thursday February 16, 2012 @11:37PM (#3602164)
Actually they are very well known. They are one of the largest adult companies on the web.
Re:Youporn.com is now a 100% Redis Site by thezilch on Thursday February 16, 2012 @04:24AM (#3597975)
VHS, Linux, and now Redis; the webscale race is over!!
Re:Youporn.com is now a 100% Redis Site by itmag on Thursday February 16, 2012 @09:20AM (#3598688)
Porn and war drive all innovation. Or so they say.
Re:Youporn.com is now a 100% Redis Site by roc on Thursday February 16, 2012 @11:31AM (#3599386)
Sex and war would seem more accurate; porn being just a subset of sex.

And I suppose one could argue that war is often just a manifestation of a desire for sex or power/money as an intermediary to sex.

Re:Youporn.com is now a 100% Redis Site by itmag on Thursday February 16, 2012 @02:33PM (#3600267)
Reading tip for you: Prometheus Rising by Robert Anton Wilson. Especially the part about the first 4 primitive circuits of the mind which govern survival, dominance, sex, stuff like that. War is very centered on Circuit II: dominance, emotions and territorial thinking.

http://www.wikisummaries.org/Prometheus_Rising

It fucked my mind when I read it :) It's a bit far out sometimes though, but it's a cool read.

Re:Youporn.com is now a 100% Redis Site by Helianthus on Thursday February 16, 2012 @05:31PM (#3601010)
It's even less scientific than Freud, and I regard Freud as much as speculation as science. At least Freud had case studies. :/
Re:Youporn.com is now a 100% Redis Site by rev087 on Thursday February 16, 2012 @12:59PM (#3599852)
Which make the concept of war even more obscene.
Re:Youporn.com is now a 100% Redis Site by roc on Thursday February 16, 2012 @02:13PM (#3600181)
If you feel that sex is obscene, perhaps.

Edit: Otherwise I don't see what the goal does to make the butchery of your fellow man any more or less obscene than it inherently is.

Re:Youporn.com is now a 100% Redis Site by fluidcruft on Thursday February 16, 2012 @02:59PM (#3600379)
I assumed he was gesturing at the creation/destruction discord inherent in sex/war with war being the referent for obscene. Of course, a full account of sex more than kisses and pleasantries, it also involves competition.
Re:Youporn.com is now a 100% Redis Site by itmag on Thursday February 16, 2012 @03:05PM (#3600407)
The (oftentimes sublimated) drive to procreate is one of the most powerful drivers of all human society and action. Perhaps even THE "primus motor" behind it all.

In Prometheus Rising RAW mentions that the reason monks take a vow of chastity is because it instantly frees them from one of the major hamster-wheels of the human condition.

Of course, I'm not planning to become a monk :) But food for thought...

Re:Youporn.com is now a 100% Redis Site by Dylan16807 on Thursday February 16, 2012 @03:47PM (#3600558)
Allow me to explain the joke.

The legal definition of obscenity requires that a work is meant to be arousing and has patently offensive sexual conduct, in addition to having no redeeming artistic value.

Therefore, adding sex into something offensive makes it more obscene.

Re:Youporn.com is now a 100% Redis Site by hnal943 on Thursday February 16, 2012 @02:47PM (#3600321)
Re:Youporn.com is now a 100% Redis Site by pellias on Thursday February 16, 2012 @04:30AM (#3597988)
I was afraid to see what youporn is (at work now), so i guess it is really a porn site.
Re:Youporn.com is now a 100% Redis Site by gaius on Thursday February 16, 2012 @05:40AM (#3598117)
The online porn industry were the first people to really deal with scalability (of managing and serving web content, anyway), the first people to deal with online payments, the first people to come under really heavy, sustained hacking attempts, etc. Don't underestimate how much of what you take for granted technologically in 2012, they pioneered in the mid-90s.
Re:Youporn.com is now a 100% Redis Site by anamax on Thursday February 16, 2012 @09:47AM (#3598867)
A friend of mine built a lot of porn sites in the late 90s using DB2 and Oracle. He says that Microsoft's SQL Server folks came to him to talk about what it would take to get him (and the porn sites) to use SQL Server.

He said that he was confident that DB2 and Oracle could handle the load. They responded that SQL Server was much more capable than he thought and asked him about the workload.

Their response to his answer was "we can't even simulate that, maybe we're not ready".

I assume that they got better.

Re:Youporn.com is now a 100% Redis Site by mun2mun on Thursday February 16, 2012 @05:55AM (#3598146)
Re:Youporn.com is now a 100% Redis Site by GrumpySimon on Thursday February 16, 2012 @07:33AM (#3598337)
It's not just now either, the porn industry was hugely influential in causing the adoption and spread of video (you know, on casette), movies and photography.
Re:Youporn.com is now a 100% Redis Site by jgw on Thursday February 16, 2012 @09:22AM (#3598705)
Indeed - I've heard it argued that the real reason that VHS won out over the technically superior Betamax format, was that Sony refused to license the Betamax technology to adult video vendors. Never dug into it, but it seems plausible.
Re:Youporn.com is now a 100% Redis Site by saraid216 on Thursday February 16, 2012 @02:25PM (#3600233)
Having just one deciding factor seems implausible. Straw that broke the camel's back? Sure. But calling it "the real reason" completely ignores every other relevant factor.
Re:Youporn.com is now a 100% Redis Site by Spearchucker on Thursday February 16, 2012 @11:09AM (#3599263)
They were also first at SEO - all of these sites competing for the same words - "sex" and "fuck" being their holy grail.
Re:Youporn.com is now a 100% Redis Site by roc on Thursday February 16, 2012 @11:33AM (#3599404)
As well as advertising networks and referral schemes.

Though, oddly, they've been late to the game on social.

Re:Youporn.com is now a 100% Redis Site by keypusher on Thursday February 16, 2012 @08:57PM (#3601686)
Scariest button on a porn site is the Like/G+ button.
Re:Youporn.com is now a 100% Redis Site by wisty on Thursday February 16, 2012 @08:59PM (#3601692)
Social took off when Zuck tricked users into giving out their real names, when meant social networks grew much faster (as old school friends would connect).

Porn does "social", but only anonymous social, which is naturally handicapped.

If someone created a social network which allowed better privacy controls, the porn sites would love it.

Re:Youporn.com is now a 100% Redis Site by dchuk on Thursday February 16, 2012 @12:37PM (#3599741)
porn is invariably a "solo" endeavor 99.9% of the time
Re:Youporn.com is now a 100% Redis Site by roc on Thursday February 16, 2012 @02:11PM (#3600168)
And yet a significant amount of money is being made by services whose natural market maps directly onto the porn site viewing market.

reviews, 'discreet' dating sites, sugar-daddy match-making sites, etc.

Re:Youporn.com is now a 100% Redis Site by thezilch on Thursday February 16, 2012 @04:22AM (#3597971)
We do the same thing, where we populate a mysql store as a secondary storage for business intelligence -- our Founder, PM, AdOps, etc know enough SQL to be dangerous if we build out more traditional, relational models.

It amused me that you were testing a porn site -- the homepage / potentially-misused zrange-issue.

Re:Youporn.com is now a 100% Redis Site by antirez on Thursday February 16, 2012 @04:26AM (#3597978)
I had to test if it was truly fast...
Re:Youporn.com is now a 100% Redis Site by cicloid on Thursday February 16, 2012 @06:18AM (#3598186)
All in the name of science!
Re:Youporn.com is now a 100% Redis Site by StavrosK on Thursday February 16, 2012 @05:41AM (#3598119)
300k requests/sec? Surely that can't be on a single Redis server, is it? Is Redis cluster out yet, or did they implement their own?
Re:Youporn.com is now a 100% Redis Site by thezilch on Thursday February 16, 2012 @12:41PM (#3599758)
Redis can run anywhere from 50-200K IOPs, on a single core, dependent on CPU; you can find benchmarks at the following:

    * http://code.google.com/p/redis/wiki/Benchmarks
    * http://redis.io/topics/benchmarks
At the point where multi-core sharding/ring setups are involved, you begin to have NIC/network saturation. It's feasible to achieve 300K on a single box.
Re:Youporn.com is now a 100% Redis Site by StavrosK on Thursday February 16, 2012 @07:47PM (#3601472)
That's amazing, thank you. This would make me want to use redis for everything, if I weren't already using it for everything.
Re:Youporn.com is now a 100% Redis Site by awj on Thursday February 16, 2012 @02:03PM (#3600125)
The OP actually addresses this. They're doing some form of clustering and had to add more nodes due to network saturation.
Re:Youporn.com is now a 100% Redis Site by shykes on Friday February 17, 2012 @03:34AM (#3602668)
Just to clarify, they're using regular master-slave, as opposed to "clustering" which is an unreleased feature.

I love how they use sInterStore as a replacement for a fat SQL query.

Re:Youporn.com is now a 100% Redis Site by sanswork on Thursday February 16, 2012 @05:58AM (#3598151)
It would be mostly reads so could be done with lots of slaves and sharding without redis cluster.
Re:Youporn.com is now a 100% Redis Site by StavrosK on Thursday February 16, 2012 @09:04AM (#3598602)
Very true, but now I wonder how many reads/sec each of those servers pushed.
Re:Youporn.com is now a 100% Redis Site by chubot on Thursday February 16, 2012 @01:10PM (#3599903)
100M page views per day is 1157 page views per second. I wonder how that's being blown up by a factor of 300?

I suppose if each video's metadata causes a redis lookup and there are 300 videos displayed per page that would do it, but you'd think you could batch those lookups. It seems a fairly inefficient.

Either that or they have some background jobs causing redis lookups that aren't a result of page views.

Re:Youporn.com is now a 100% Redis Site by eric-hu on Friday February 17, 2012 @01:56AM (#3602480)
There's 30 videos on the front page. Mousing over the image preview of a video displays a series of preview images.

There were 76 requests made as observed from the net tab in Firebug. The majority of these requests seemed to be for those video images. Note that I'm using an adblocker and refuse to check out the site without it.

Note also that they said 300k queries. There could be constantly-running background jobs doing conversion, pulling those preview frames, and crunching numbers on the metadata.

Re:Youporn.com is now a 100% Redis Site by memoryfault on Thursday February 16, 2012 @01:23PM (#3599957)
Perhaps the 300k/s figure was at peak load.
Re:Youporn.com is now a 100% Redis Site by n_time on Thursday February 16, 2012 @10:17PM (#3601940)
...
Re:Youporn.com is now a 100% Redis Site by johnx123-up on Thursday February 16, 2012 @10:06AM (#3598951)
Do they use any sort of wrapper or architecture around it? Is it in Ruby, BTW?
Re:Youporn.com is now a 100% Redis Site by pavelkaroukin on Thursday February 16, 2012 @11:29AM (#3599380)
AFAIK, it is Perl project. And I remember seeing it showcased at Catalyst website, so it likely built on top of Catalyst Framework
Re:Youporn.com is now a 100% Redis Site by povilas on Thursday February 16, 2012 @12:02PM (#3599555)
Re:Youporn.com is now a 100% Redis Site by pavelkaroukin on Monday February 20, 2012 @10:25AM (#3612640)
Thanks.

  Tomorrow our site, with over 100 million page views per day, will be relaunching running on Symfony2.  This is a complete rewrite.  Prior to that it was running the Catalyst Engine written in Perl.
Re:Youporn.com is now a 100% Redis Site by webda2l on Wednesday February 22, 2012 @06:48AM (#3620481)
Symfony2 rocks
Re:Youporn.com is now a 100% Redis Site by rhizome on Thursday February 16, 2012 @02:52PM (#3600340)
Sounds like Redis is being put to the role of reader boxes in the older split-head MySQL (or *SQL) architecture "write to master, read from slaves" with a conversion shim between MySQL & Redis..
Re:Youporn.com is now a 100% Redis Site by jarin on Thursday February 16, 2012 @03:23PM (#3600495)
I'm doing something similar with Dirty Hot Productions (one of my clients). We use MySQL on a separate CMS Rails app to store everything, and all of the websites communicate with the CMS via an API. We use Redis to cache all of the API responses, so effectively everything except the first read (or the first "dirty" read) on a particular query is coming straight from Redis. It works amazingly well, and it doesn't use nearly the amount of RAM I thought it would.
Re:Youporn.com is now a 100% Redis Site by siculars on Friday February 17, 2012 @12:49AM (#3602332)
Don't travel to Iran.