Alipay-Double A challenge and response
Personal detailed understanding has been sorted out, link address
http://blog.csdn.net/qq_15437667/article/details/50963770 process
Red Envelopes-"search for Red Envelopes"-"Red envelope rendering & Payment Introduction content:
Link carding, performance optimization, capacity evaluation, business volume evaluation, System Protection link carding:
Hardware high frequency hotspot
Red envelopes internal hot spots:
Storage fragmentation hotspots,
Database records hotspots,
Connection pooling/thread pool dependencies,
Key link optimization
Budget Control Single Point
Optimistic lock, from the logical processing;
Database optimization
Budget single splits, child budget sets can split: problems, fragmentation (timing merging, distributed merging, Final judgment is single point), sub budget routing performance
Payment rule management, template data cross-Library
Pay more than one lump sum red envelopes
Any payment behavior
Tenderness
Grab a red envelope,
Forms of funds--individuals--"individuals, individuals--" many people
Stability: the transfer of various amounts of money to the red envelopes, the participants in the robbery,
The flow of money into
Merchant-"Individual (merchant funds ready) mode, three kinds
Many kinds of red envelopes, pure cash, vouchers and so on, platform coupons
Directional Red envelopes, Links
Red envelopes launch, show, use business challenges
Massive capacity, a moment, millions of capabilities, (expect low cost, need extreme optimization, not only database, caching, but also need to streamline the link);
Low cost
Financial security;
Quick recovery capability, quick recovery in 10 minutes with three phases of problem
Budget issues, two questions: a red envelope can not be super, two mass capacity
Show, Render: rule, directed to platform or red envelope orientation--"
The use phase, many of the user's red envelopes are often used at the same time, (Alipay, a payment in support of 10 red envelopes) Budget problem consistency problem, abstract out a budget center, strong consistency; but sometimes, there is no strong consistency. Whether the budget must be finished, the beginning is a single record mode, the bottleneck is very large. Alipay is just beginning to be pessimistic lock,
Optimization point. MySQL, modify the patch, reduce the lock time, reduce network (interactive) overhead, and perform the last use of commit (Application layer).
Single node has the upper limit, 4000, so upgrade to multiple nodes,
Multiple records of the problem, the budget is run out. The budget will be automatically scaled, timed detection, below the threshold of the merger. (Encounter hot issues, need to be circumvented manually)
Using a database is bound to be limited by the database, and the memory is weighed against the merits of the database schema. The patch has no open source; it will limit the flow of the marketing activities; hot alert; automatic scaling capacity can not cause the same hot spot. Presentation, rendering Stage
Rules, the rules are multidimensional, presumably a three-dimensional dimension, the rules of how to use distributed multilevel caching. Rule information redundancy is over red envelopes (redundancy can make it difficult to modify, mainly for personal redundancy). With a fixed memory cache, Taobao, Cat, and less marketing activities, this will be loaded into memory in advance. Treats the merchant, uses the LRU the way, the rule is discrete, the quantity is huge,. Problem of payment and number of red envelopes
According to the number of red envelopes, identify the user attribute, the more the number of red envelopes, the more frequent consumption
The more you pay the red envelopes, the more redo log you generate. Save CQ Environment, avoid the peak.
Global payment buffer queues, asynchronous non-critical SQL calls, SQL merges, bulk SQL submissions.
Rollup task cursors. Need to have a task to collect red envelopes. (The more tasks, the greater the pressure) as far as possible to break down the task more broken, reduce each task time, increase the frequency of the task.
Also need to be able to solve hot issues online, self-heterogeneous protection mass capacity upgrade/verification means
Service elasticity and scalability, dependent Aliyun
Data elasticity, scale, oceanbase, read and write separation, data unlimited scalable, red envelopes running on the above.
Cell, the user in the visit Alipay, all the requests, will be limited to a logical room, minimizing the room interaction. The engine room level disaster, to the application connection has the Help verification method
Full-Path pressure measurement, shadow method, online pressure measurement. Through this discovery system the problem. Financial security beforehand system
Secure coding, consistency,
Capital balance, internal processing funds are balanced, the expected value is equal to the actual value
Call downstream system, is not what I want ...
Tamper proof, CTU.
Tool flower identification means in the system
Business monitoring, to identify whether the flow generated by the explosion, to the minute level,
Business fuse, funds monitoring. Afterwards system
Second level full path check (not all check), t+1,t+h (real-time check) check. Rapid recovery mechanism
Tiered recovery mechanism to ensure a minute-level recovery.
Gray is the daily guarantee of the core, a key disaster-tolerant dual 11 protection:
Pre-plan, dynamic current limiting measures, non-critical service demotion
Contingency plans,
Activity monitoring dimension, user feedback is very important. Need to use small two quick answer why red envelopes are not available. The most simplified data, data analysis is the most sophisticated, can not let go of any one of the stability of risk best experience, product experience balance.