Renren's architecture

Source: Internet
Author: User
Tags domain name server nameserver nslookup

Renren is the original School Intranet. The name of the School Intranet has some limitations on the Development of SNS. At the same time, due to the increasing pressure of happy 001, Qianxiang group made a decision to change its name, for details, see here.

Renren has approximately 5000 servers. At the beginning, the servers were hosted at 21 vianet. However, the cost of this operation method is too high because of the high cost of IDC hosting, therefore, the server was directly hosted in the IDC of China Telecom and China Netcom.

Renren mainly uses Java for development, and women's Channel BBS uses PHP for development, while Web servers mainly use nginx and resin.

The database uses MySQL, the master-slave method, and the MySQL proxy program for intermediate layer proxy, and the data is vertically split according to the website functions, for example, user registration and login are part of the log, logs are part of the album, and games are part of the log; horizontal segmentation of the data itself, that is, hash tables or hash databases.

Renren probably has the following domain names. Of course there are some other domain names. I did not list them one by one, but listed some common domain names.
Www.renren.com
Www.5q.com
Home.renren.com
I .renren.com
Friend.renren.com
App.renren.com (list of all applications)
Pai.renren.com (enter an Application)
Game.renren.com
Msg.renren.com
Login.renre.com
Reg.renren.com
Invite.renren.com
Pay.renren.com
Browse.renren.com (for search)
Blog.renren.com
Photo.renren.com
Group.renren.com
Pai.renren.com
Gift.renren.com
Abc.ren.com
Club.renren.com (ForUM)
Class.renren.com (class)
Game.renren.com
Dev.renren.com
Page.renren.com
Mobile.renren.com (mobile Renren)
M.renren.com
Support.renren.com (Customer Service)
Basketball.renren.com (basketball star)
Maoyou.renren.com (cat Travel Notes)
Xnproxy.ad.renren.com
Lady.renren.com
Ladybbs.renren.com (renrenren women channel Forum)
S.xnimg.cn (the server that saves JS, CSS, and image data)
Jebe.xnimg.cn
App.xnimg.cn
HDN *** .xnimg.cn
HD *** .xnimg.cn
.....
There should be some domain names

Among them, the web server used for game (Pay) .renren.com is resin, and I did not test all the domain names of Renren. So what I'm talking about is
C:/Windows/system32> curl-I game.renren.com
HTTP/1.1 302 found
Server: Resin/3.0.21
Cache-control: No-Cache
Pragma: No-Cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Location: http://login.renren.com/Login.do? Rf = R & origurl = http % 3A % 2f % 2fgame.renren.com % 2findex. Do
Set-COOKIE: KL = NULL; domain = .renren.com; Path =/; expires = Thu, 01-dec-1994 16:00:00 GMT
Set-COOKIE: societyguester = NULL; domain = .renren.com; Path =/; expires = Thu, 01-dec-1994 16:00:00 GMT
Set-COOKIE: xnessessionid = 66536e18a936; domain = .renren.com; Path =/
Set-COOKIE: xnessessionid = abcaaokvt8edz8nlxrlns; domain = .renren.com; Path =/
Content-Type: text/html; charset = UTF-8
Content-Length: 123
Date: Mon, 24 Aug 2009 09:12:21 GMT

Besides game (Pay) .renren.com, nginx does not support Java (JSP, Servlet, etc ), java is supported only when combined with tomcat, resin, WebLogic, and websphere.
C:/users/caihuafeng> curl-I Renren.com
HTTP/1.1 302 found
Server: nginx/0.6.32
Date: Sun, 23 Aug 2009 19:07:59 GMT
Content-Type: text/html
Connection: keep-alive
Cache-control: No-Cache
Pragma: No-Cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Location: http://wwv.renren.com/xn.do? Ss = 10112 & RT = 26
Set-COOKIE: KL = NULL; domain = .renren.com; Path =/; expires = Thu, 01-dec-1994 16:00:00 GMT
Set-COOKIE: societyguester = NULL; domain = .renren.com; Path =/; expires = Thu, 01-dec-1994 16:00:00 GMT
Set-COOKIE: xnessessionid = cc54212fc1bc; domain = .renren.com; Path =/
Set-COOKIE: depovince = zgqt; domain = .renren.com; Path =/; expires = wed, 26-aug-2009 19:07:59 GMT
Set-COOKIE: jebecookies = 6ffb5bf3-7eea-4a15-a341-2b18f249650b ||||; domain = .renren.com; Path =/
Set-COOKIE: _ R01 _ = 1; domain = .renren.com; Path =/; expires = wed, 18-aug-2010 19:07:59 GMT
Content-Length: 80

NSLookup xnimg.cn: the output is as follows. The domain name xnimg.cn is followed by a group of cluster servers. Different users access different servers.
C:/Windows/system32> NSLookup xnimg.cn
Server: ns.crcbj.com
Address: 61.233.9.9

Non-authoritative response:
Name: xnimg.cn
Addresses: 123.129.232.37
123.129.232.38
123.129.232.39
123.129.232.40
123.129.232.55
123.129.232.56
123.129.232.57
123.129.232.58
123.129.232.59
123.129.232.11
123.129.232.33
123.129.232.35
123.129.232.36

Similarly, s.xnimg.cn and xnimg.cn are also a group of Server clusters.
C:/Windows/system32> NSLookup s.xnimg.cn
Server: ns.crcbj.com
Address: 61.233.9.9

Non-authoritative response:
Name: s.xnimg.cn
Addresses: 123.125.46.62
123.125.46.65
123.125.46.66
123.125.46.59
123.125.46.60

The HDN *** .xnimg.cn and HD *** .xnimg.cn servers seem to use the CDN system. Let's take the hdn111.xnimg.cn domain as an example.

The Image Upload header is
Server nginx/0.7.57
Date Mon, 24 Aug 2009 10:04:18 GMT
Content-Type Image/JPEG
Connection keep-alive
Content-Length 1576
Last-modified Mon, 15 Jun 2009 13:53:31 GMT
Expires Thu, 06 Aug 2009 15:32:50 GMT
Cache-control Max-age = 2592000
Accept-ranges bytes
Age 1, 190672
X-Cache hit from hdn-JNDSTWT232-96.opi.com

From the above output, we can see that this server uses CDN-related technologies. Renren's CTO is Huang Jing. I don't know if the above letter h Represents Huang. I can only guess it.

Renren's own domain name servers ns1.5q.com and ns2.5q.com
C:/users/caihuafeng> NSLookup-Qt = NS Renren.com
Server: ns.crcbj.com
Address: 61.233.9.9

Non-authoritative response:
Renren.com nameserver = ns1.5q.com
Renren.com nameserver = ns2.5q.com

Ns2.5q.com Internet address = 211.100.33.208

The Domain Name Server ns1.5q.com does not have port 53 enabled. Only the Domain Name Server ns2.5q.com has port 53 enabled, and port 53 is the default port of the DNS service. The specific reason is unknown.
[Root @ centos_test_server ~] # NMAP ns1.5q.com

Starting NMAP 4.11 (http://www.insecure.org/nmap/) at CST
Interesting ports on 123.125.40.219:
Not shown: 1679 filtered ports
Port State Service
80/tcp closed HTTP

NMAP finished: 1 IP address (1 host up) scanned in 29.504 seconds
[Root @ centos_test_server ~] # NMAP ns2.5q.com

Starting NMAP 4.11 (http://www.insecure.org/nmap/) at CST
Interesting ports on 211.100.33.208:
Not shown: 1678 filtered ports
Port State Service
53/tcp Open Domain
80/tcp closed HTTP

NMAP finished: 1 IP address (1 host up) scanned in 26.963 seconds

Renren.com, Renren.com
C:/Windows/system32> NSLookup-Qt = mx Renren.com
Server: ns.crcbj.com
Address: 61.233.9.9

Non-authoritative response:
Renren.com MX preference = 10, mail exchanger = mail.renren.com

Renren.com nameserver = ns2.5q.com
Renren.com nameserver = ns1.5q.com
Mail.renren.com Internet address = 123.125.46.175
Ns1.5q.com Internet address = 123.125.40.219
Ns2.5q.com Internet address = 211.100.33.208

Port 110 and port 25 are opened on the server mail.renren.com and confirmed to be the email server.

[Root @ centos_test_server ~] # NMAP-O mail.renren.com

Starting NMAP 4.11 (http://www.insecure.org/nmap/) at CST
Warning: OS Detection will be much less reliable because we did not find at least 1 open and 1 closed TCP port
Interesting ports on 123.125.46.175:
Not shown: 1677 filtered ports
Port State Service
25/tcp open SMTP
80/tcp open HTTP
110/tcp open POP3

Device Type: Broadband Router | General Purpose
Running: Maid, Linksys embedded, Linux 2.4.x | 2.5.x | 2.6.x
OS details: fiberline wireless DSL router, Linksys wag54g wireless gateway, Linux 2.2.16, Linux 2.4.7-2.6.11, Linux 2.6.0-2.6.11, Linux 2.6.4-2.6.9, Linux 2.6.8 (UBUNTU)
Uptime 41.448 days (since Tue Jul 14 08:39:12 2009)

NMAP finished: 1 IP address (1 host up) scanned in 33.138 seconds

Tracking Domain NameWww.renren.comDomain name resolution process

[Root @ centos_test_server ~] # Dig www.renren.com + trace | nali

; <> Dig 9.3.4-P1 <> www.renren.com + trace
; Global Options: printcmd
. 10304 in NS I .ROOT-SERVERS.NET.
. 10304 in NS G.ROOT-SERVERS.NET.
. 10304 in NS A.ROOT-SERVERS.NET.
. 10304 in NS E.ROOT-SERVERS.NET.
. 10304 in NS K.ROOT-SERVERS.NET.
. 10304 in NS M.ROOT-SERVERS.NET.
. 10304 in NS L.ROOT-SERVERS.NET.
. 10304 in NS B .ROOT-SERVERS.NET.
. 10304 in NS J.ROOT-SERVERS.NET.
. 10304 in NS H.ROOT-SERVERS.NET.
. 10304 in NS C.ROOT-SERVERS.NET.
. 10304 in NS F.ROOT-SERVERS.NET.
. 10304 in NS D.ROOT-SERVERS.NET.
; Received 460 bytes from 61.233.9.9 [Beijing tietong] #53 (61.233.9.9 [Beijing tietong]) in 65 MS

Com. 172800 in NS L.GTLD-SERVERS.NET.
Com. 172800 in NS M.GTLD-SERVERS.NET.
Com. 172800 in NS A.GTLD-SERVERS.NET.
Com. 172800 in NS B .GTLD-SERVERS.NET.
Com. 172800 in NS C.GTLD-SERVERS.NET.
Com. 172800 in NS D.GTLD-SERVERS.NET.
Com. 172800 in NS E.GTLD-SERVERS.NET.
Com. 172800 in NS F.GTLD-SERVERS.NET.
Com. 172800 in NS G.GTLD-SERVERS.NET.
Com. 172800 in NS H.GTLD-SERVERS.NET.
Com. 172800 in NS I .GTLD-SERVERS.NET.
Com. 172800 in NS J.GTLD-SERVERS.NET.
Com. 172800 in NS K.GTLD-SERVERS.NET.
; Received 504 bytes from 192.36.148.17 [Stockholm, Sweden] #53 (I .ROOT-SERVERS.NET) in 498 MS

Renren.com. 172800 in NS ns1.5q.com.
Renren.com. 172800 in NS ns2.5q.com.
; Received 103 bytes from 192.55.83.30 [us] #53 (M.GTLD-SERVERS.NET) in 5401 MS

Www.renren.com. 600 in a 123.125.44.242 [Beijing Unicom ADSL]
Renren.com. 600 in NS ns1.5q.com.
Renren.com. 600 in NS ns2.5q.com.
; Received 119 bytes from 123.125.40.219 [Beijing Unicom ADSL] #53 (ns1.5q.com) in 62 MS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.