Top Banner
&PHP Đào Hải Long – Technical Manager @Zing me
26

Zing Me & PHP

Apr 12, 2017

Download

Technology

Long Dao
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Zing Me & PHP

&PHPĐào Hải Long – Technical Manager @Zing

me

Page 2: Zing Me & PHP

2

Click to add Title

1 Click to add Title

Case study: Fantaplay app

Giới thiệu ZingMe

Zing Me & PHP2

3

4

Nội dung

Thách thức 2010

Page 3: Zing Me & PHP

3

From Yobanbe to Zing MeFrom Yobanbe to Zing Me

Page 4: Zing Me & PHP

4

Thống kê

Tài khoản đăng ký: 8 M

Active Users/month (A30): ~4M

Active Users/Day (A1): ~1.2M

Pageviews: ~20M/day (GA), > 50M reqs/day

API calls: > 100M calls/day (>1000 calls/sec)

bandwidth (total): 2Gbps

Hạ tầng:– 110 máy chủ (> 400 core, total), trong đó

– 30 RDBMS

– 10 Memcached, Redis, ...

– 30 Webservers

– 10 Storage Servers

– 10 Web Caching, Load Balancing Servers

– 5 Search Server, 5 Data Mining Servers

Page 5: Zing Me & PHP

5

Tăng trưởng người dùng

A30: 3,876,287 by 12/12

Page 6: Zing Me & PHP

6

Zing Me

Nền tảng sử dụngKiến trúc tổng thể của Zing MeZing Me & OpenSocial

Page 7: Zing Me & PHP

7

Nền tảng

LAMP– LVS

– Lustre

– Squid (Yahoo TrafficServer)

– Apache, nginx

– PHP

– MySQL, mysql proxy, Infobright

– Sphinx-Search

– Memcached, Tokyo Tyrant, Redis

– Memcacheq

– cacti

Page 8: Zing Me & PHP

8

Kiến trúc Zing Me

RESTFul/SOAP

Page 9: Zing Me & PHP

9

Kiến trúc vât lý

Page 10: Zing Me & PHP

10

Zing Me & OpenSocial

Zing Me sẽ chính thức hỗ trợ Open Social vào quý 2 năm 2010

Page 11: Zing Me & PHP

11

Mở rộng ứng dụng(Scaling)

PHPCaching

– Memcached

– Redis

MySQLMonitoring - cacti

Page 12: Zing Me & PHP

12

PHP

Mở rộng đơn giản: – Loại bỏ các module thừa– Thêm máy chủ vào hệ thống

Các thành phần– PHP 5.2.x– APC, json, memcache– Zend Framework

– Apache 1.3.34, nginx

Page 13: Zing Me & PHP

13

Zend Framework

Zend MVCZend_DBZend_Auth, Zend_AclZend_Rest, Zend_ServerZend_Cache, Zend_SessionZend_Service, Zend_Gdata

Page 14: Zing Me & PHP

14

memcached

Hiện tại:– memcached 1.2.x– 64 GB memory

Tương lai:– Memcached 1.4– Php + libmemcached

Page 15: Zing Me & PHP

15

redis

Tốc độ tốtHỗ trợ nhiều cấu

trúc dữ liệu.Có khả năng lưu

xuống đĩa, tránh mất dữ liệu

Lưu trữ dữ liệu hoạt động của người dùng (Activity Feed)

Page 16: Zing Me & PHP

16

MySQL

Giai đoạn 1: MySQL Master-SlaveGiai đoạn 2: Cluster MySQLHiện nay: MySQL proxy, Sharding MySQL

Page 17: Zing Me & PHP

17

Cacti

Page 18: Zing Me & PHP

18

Nền tảng khác

Zing Me & Ms .NETZing Me & Java

Page 19: Zing Me & PHP

19

Zing Me & .NET

Ưu điểm:– Tốc độ rất tốt– Cộng đồng lớn

Nhược điểm:– Bảo trì khó

Ứng dụng:– Zing News (6M Pgvs/day)

– Zing Me (comments, Voting, Hitcount: 100M reqs/day)

Page 20: Zing Me & PHP

20

Zing Me & Java

Ưu điểm:– Tốc độ rất tốt– Tin cậy, mã nguồn mở

Nhược điểm:– Bảo trì khó– Cộng đồng nhỏ

Ứng dụng:– Zing Payment

Page 21: Zing Me & PHP

21

Case study: Fantaplay by TCV Media

Page 22: Zing Me & PHP

22

Case study: Fantaplay by TCV Media

URL: http://me.zing.vn/apps/fantaplay DAU: >15,000 MAU: 26,000 (1.5 days after launch) Highscore board: >10,000 records

Page 23: Zing Me & PHP

23

Thách thức 2010

Tài khoản đăng ký: 20 MActive Users/month (A30): 10MActive Users/Day (A1): 4MPageviews: 200M/day (GA), 500M reqs/dayAPI calls: > 1B calls/day (>10000 calls/sec)bandwidth (total): 30GbpsHạ tầng:

– Hơn 400 máy chủ (> 2000 core, total)

– Multi Datacenters

Page 24: Zing Me & PHP

24

Hướng phát triển

R&D– IR/Search Engine– CDN

– Distributed Computing

– Data Storage– Data Mining

Dự tính nhân sự– 10 Engineerings

– 5-10 Scientific Researchers

Page 25: Zing Me & PHP

25

Thảo luận

Câu hỏi ?!

Page 26: Zing Me & PHP

www.zing.vn