Conference Schedule - PGConf.EU 2015

Back

Location based dating in China - 0 to 100000000 daily swipes in a year

Date: 2015-10-28
Time: 14:00 - 14:50
Room: Ballroom A+B
Level: Intermediate

Tantan is at the moment the best location based dating app for Android and iOS in China. We started early summer 2014 on a blank sheet and now handle more than 500k daily users in our backend built on Go using PostgreSQL together with PostGIS as our database.

In this presentation I will talk about how we have scaled horizontally with a custom but simple sharded solution built on schemas to handle our current and future load. About how we have come a long way with a simple strategy, using only PostgreSQL and application sharding. I bring up some optimizations we did and some things to watch out for.

Each day we store and process 100 million swipes, create 500 thousand matches between our users and respond to 10 million geospatial queries. In the app we show nearby users ranked by closeness, activity and profile information, and only those you have not seen before ranked for optimal match chance. To calculate the list of nearby available users we have a fairly complex plpgpsql function utilizing a gist index for the k-nearest neighbor ordering. It returns a result in around 100-200ms.

Speaker

Victor Blomqvist