Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Load measures - System modification of bottlenecks for the next campaign. - The previous issue has been resolved, but problem occurred elsewhere. - System burst due to sudden traffic such as a campaign. - As a result, scale out and scale up in a hurry.

Slide 3

Slide 3 text

Agenda - Service overview - System architecture (old) - System load Issues - Points of system improvement - System architecture (new) - Summary

Slide 4

Slide 4 text

STORE’s R∞ service overview CRM (Customer Relationship Management) Analysis Visualize your store customer details. • Store’s customer data • Yahoo! JAPAN Shopping Premium member rate • Signs of estrangement, • etc. Campaign Automatic distribution of optimal campaign. Who What When Verify the effects PDCA for customer nurturing.

Slide 5

Slide 5 text

User STORE’s R∞ service overview CRM (Customer Relationship Management) API Cart pages Product detail pages Yahoo! JAPAN Shopping ValueCommerce

Slide 6

Slide 6 text

Display the coupons that the customer is applying and the coupons that can be used. Notify customers who are viewing product details about coupons that can be used. STORE’s R∞ service overview CRM (Customer Relationship Management) Product detail pages Cart pages

Slide 7

Slide 7 text

Yahoo! JAPAN Shopping campaign - Regular campaigns by day of the week, date, etc. - 5 to 10 times more requests (RPS) than usual. - The amount of data such as purchase data is the same.

Slide 8

Slide 8 text

Thu. Fri. Sat. Sun. Mon. Tue. Wed. Thu. Fri. Sat. Sun. Mon. Tue. Wed. Yahoo! JAPAN Shopping campaign Specific two-week request. Regular campaigns by day of the week. Regular campaigns by date.

Slide 9

Slide 9 text

Coupon data User data (RDBMS) User Store System Architecture (old) Deliver Process Deliver Server (Java Servlet) Yahoo! JAPAN Shopping

Slide 10

Slide 10 text

Store Access Log Purchase Log (RDBMS) System Architecture (old) Aggregate Process Deliver Server (Java Servlet) Apache Spark

Slide 11

Slide 11 text

Delivery process Response deterioration User data update Update delay Analysis data update Aggregation delay Issues

Slide 12

Slide 12 text

Display the coupons that the customer is applying and the coupons that can be used. Notify customers who are viewing product details about coupons that can be used. Issues Product detail pages Cart pages

Slide 13

Slide 13 text

Issues Analysis Visualize your store customer details. • Store’s customer data • Yahoo! JAPAN Shopping Premium member rate • Signs of estrangement, • etc. Campaign Automatic distribution of optimal campaign. Who What When Verify the effects PDCA for customer nurturing.

Slide 14

Slide 14 text

Improvement plan Apache Spark scale out. RDBMS scale out. ⎯ Automatically scale out in advance based on CPU / Memory / Load Average. ⎯ Tuning Thread Count ⎯ Add the number of cluster nodes in advance. ⎯ Augment read-only read replicas. API Server scale out.

Slide 15

Slide 15 text

Improvement plan Apache Spark scale out. RDBMS scale out. ⎯ Automatically scale out in advance based on CPU / Memory / Load Average. ⎯ Tuning Thread Count ⎯ Add the number of cluster nodes in advance. ⎯ Augment read-only read replicas. API Server scale out. Fundamentally change the system configuration. Change to a system architecture that is resistant to load.

Slide 16

Slide 16 text

Points of system improvement Deliver server Aggregate process User data

Slide 17

Slide 17 text

Points of system improvement Deliver server Aggregate process User data

Slide 18

Slide 18 text

Params: user id and product code. Get user data Get coupon data Return target coupon Acceptance of requests Deliver server processing flow User data: 30-40 million. Coupon data: thousands.

Slide 19

Slide 19 text

Params: user id and product code. Get user data Get coupon data Return target coupon Acceptance of requests Deliver server processing flow User data: 30-40 million. Coupon data: thousands. Key-Value Store mdbm (memory-mapped key/value store)

Slide 20

Slide 20 text

Coupon data structure (mdbm) Key: Store ID typedef struct { int64_t client_id; int32_t campaign_num; campaign_data_t campaigns[]; } campaign_list_t; typedef struct { _birth_t birth; _range_t age_range; _prefecture_t prefecture; _rank_t rank; _range_t purc_count_total; _range_t purc_amount; ・・・ } typedef struct { int64_t campaign_id; _targeting_condition_t condition; ・・・ } campaign_data_t;

Slide 21

Slide 21 text

User Data (redis) Coupon Data (RDBMS) Store mdbm generate batch Yahoo Shopping System Architecture (new) Deliver Process Deliver Server (Apache Module) Coupon Data (mdbm)

Slide 22

Slide 22 text

Points of system improvement User data Deliver server Aggregate process

Slide 23

Slide 23 text

Demographic info • Sex • Residential areas • Age • Birth month Action history • Last access • Access to specific products • Purchase of specific products • Non-purchase of specific products • Purchase amount in the past Custom info • Yahoo premium member • SB smartphone user • Ymobile smartphone user • Rank specified by the store User data type

Slide 24

Slide 24 text

Redis data structure field = "customer" KEY = value = field = "acc" value = field = "rank" value = { "sex": 1, "birth": [1964, 1], "prefecture": 27, ... } { "": [ {"item": "", "time": 1665975527}, {"item": "", "time": 1666000534} ], ... } { "": { "purcHist": [ {"amount": 7251, "item": "", "time": 1666003823, "type": 3679}, {"amount": 2709, "item": "", "time": 1666144923, "type": 3679}, ], "repeat": 103428, "rank": 129283, "lastPurc": 1666144923, "pCount": 1, "pAmount": 9960, "tCount": 1, "tAmount": 9960 }, ... "mTCount": 247, "coupon": [ "Nzg1ZDRmYTAzOGRhZjRlMmRkNTNiMTk4YjA3" ] }

Slide 25

Slide 25 text

Issue of updating • Process of updating an existing record • Need to atomic User Data (redis) Deliver Server (Apache Module) 1. Get 6. Set 2. Decompression 3. Json parse 4. Update

Slide 26

Slide 26 text

Issue of updating • Process of updating an existing record • Need to atomic User Data (redis) Deliver Server (Apache Module) 1. Get 6. Set 2. Decompression 3. Json parse 4. Update Redis Module (Introduced from redis 4.x)

Slide 27

Slide 27 text

VCROO.HMGET Original implemental command ⎯ Same as standard HGET ⎯ Same as standard HMGET VCROO.HGET Redis> VCROO.HGET acc {"17603":[ { "item":”", "time":1666459863 } ], "1273540":[ { "item":”", "time":1666253214 } ], … } VCROO.RECCV ⎯ Update specific product access in “acc” field ⎯ Update specific product purchase in “cv” field VCROO.RECACC ・・・

Slide 28

Slide 28 text

Points of system improvement Aggregate process Deliver server User data

Slide 29

Slide 29 text

Customer Rank • Different settings for each store • Aggregated for up to 2 years of data • Re-aggregation is required when settings are changed Rank Aggregate Processing

Slide 30

Slide 30 text

Data Source (RDBMS) Data Source (RDBMS) Issue of adding node node node node node ・・・・・

Slide 31

Slide 31 text

Data Source (RDBMS) Data Source (RDBMS) Issue of adding node node node node node node node ・・・・・

Slide 32

Slide 32 text

Instance Storage Request Infrastructure cost (EMR / RDBMS)

Slide 33

Slide 33 text

Data (S3) Side Data (RDBMS) Store Side data upload batch System Architecture (new) Deliver Server (Apache Module) node node node

Slide 34

Slide 34 text

Data (S3) Side Data (RDBMS) Store Side data upload batch System Architecture (new) Deliver Server (Apache Module) node node node

Slide 35

Slide 35 text

Data (S3) Side Data (RDBMS) Store Side data upload batch System Architecture (new) Deliver Server (Apache Module) node node node

Slide 36

Slide 36 text

Data (S3) Side Data (RDBMS) Store Side data upload batch System Architecture (new) Deliver Server (Apache Module) node node node

Slide 37

Slide 37 text

What by change system architecture - Infrastructure cost. (Number of servers during campaign.) - Aggregate processing time. 5-6 hours. 2-3 hours. About 40% reduction

Slide 38

Slide 38 text

Summary System load and performance issues - Provisional solution In a situation that services continues to grow, it will be difficult to deal only with a provisional solution. - Fundamental architectural change Architecture changes should also be considered based on medium- to long-term maintenance costs and infrastructure costs. - Scalability Bottlenecks newly discovered in the process of service growth.

Slide 39

Slide 39 text

Thank you