Skip to content

Latest commit

 

History

History
353 lines (130 loc) · 2.88 KB

互联网公司技术架构资料.淘宝.数据魔方系统架构.pdf.md

File metadata and controls

353 lines (130 loc) · 2.88 KB

Agenda MySQL NoSQL

· 30 ·

· 60G ·

RAC

DataX / TimeTunnel

Hadoop

MyFOX

Prom

/ glider

API

MySQL--MyFOX SQL

MySQL--MyFOX

· MyFOX

·

·

·

MyFOX

APP

MySQL

MyFOX--

· · · JOIN

· N · ·

· 200W · 5%

thedate=20100816, tid=11^A2090000 thedate=20100816, tid=12^A2120000 thedate=20100816, tid=13^A760000 thedate=20100816, tid=14^A289 thedate=20100816, tid=11^A2090000 thedate=20100816, tid=12^A2000000 thedate=20100816, tid=12^A120000 thedate=20100816, tid=13^A760000 thedate=20100816, tid=14^A289

·

· ""

thedate=20100816, tid=11^A2090000 thedate=20100816, tid=14^A289

thedate=20100816, tid=12^A2000000

thedate=20100816, tid=13^A760000 thedate=20100816, tid=12^A120000

MyFOX-- SELECT IF(INSTR(f.keyword,' ') > 0, UPPER(TRIM(f.keyword)), CONCAT(b.brand_name,' ',UPPER(TRIM(f.keyword)))) AS f0, SUM(f.search_num) AS f1, SUM(f.uv) AS f2, ROUND(SUM(f.search_num) / SUM(f.uv), 2) AS f3, AVG(f.uv) AS f4 FROM f INNER JOIN dim_brand b ON f.keyword_brand_id = b.brand_id WHERE f.keyword_type_id = 1 AND f.keyword != '' AND keyword_cat_id IN ('50002535') AND thedate <= '2011-03-10' AND thedate >= '2011-03-08' GROUP BY f0 ORDER BY SUM(f.search_num) DESC LIMIT 0, 1500

MyFOX--

APC

SQL

SQL

X

MyFOX-- WHERE thedate <= '2011-03-10' AND thedate > '2011-03-07' AND toprank_id IN (2, 3)

2 {"toprank_id":"2", 2011-03-08 "thedate":"2011-03-08"} {"toprank_id":"2", 2011-03-09 "thedate":"2011-03-09"} {"toprank_id":"2", 2011-03-10 "thedate":"2011-03-10"}

3 {"toprank_id":"3", "thedate":"2011-03-08"} {"toprank_id":"3", "thedate":"2011-03-09"} {"toprank_id":"3", "thedate":"2011-03-10"}

MyFOX-- SELECT a AS f0, SUM(f.search_num) AS f1, SUM(f.uv) AS f2, ROUND(SUM(f.search_num) / SUM(f.uv), 2) AS f3, AVG(f.uv) AS f4 · AVGa · 1 + SUM(a) · SELECT a FROM ... ORDER BY b ·

MyFOX

· ¾ ¾

MyFOX--

MyFOX 30

MySQL 15k SAS300G * 12raid10 :4.5W / T

MySQL 7.2k SATA1T * 12raid10 :1.6W / T

Prom--

Prom-- 13 113ID 2ID 3ID 43ID

Prom--Redis Redis · Key-Value · ListSet

· ·

Prom--HBase

· HBasehdfsHadoop ·

·

Prom--HBase

Row-key

1

ID

2

1249 13 147

{58, 600,35}, {72,999,14}, {92,103,77}, {36,702,101} {58, 600,35}, {92,103,77}, {85, 442, 152}

Prom--HBase

SUM(alipay)

13

1 1, 2, 3, 4, 5, 6, 7, 8, 9 2 1, 2, 3, 4, 5, 6, 7

2 1, 4 SUMHbase

Prom-- sum, count, avg, group by, sort
· ·

SQLNoSQL SQL NoSQL

--Glider

· SQL · HTTP REST · JSON

Glider

Dispatcher

Controller datasource

MyFOX

Prom

action

filter

JOIN

UNION

Glider URLnocache?

data

glider

nocache?

action cache

nocache?

datasource cache

etag, http header ttl, http header ttl

Glider--

· ·

· ·

--Cubex JS · http, event · ·

JS

......

Hadoop

MySQL

HBase

API

!