© 2014 , Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of , Inc.
多渠道计费系统最佳实践 - SQS
何涛 & 姚磊
2014年12月12日
Agenda
1. Issues and Challenges
2. Alternative Proposals
3. Production IT Evaluations
4. Final Solution
Issues and Challenges
• More distribution platform,More billing channels
• Heterogeneous network architecture
AppStore, Google play, T-Store …
Apple IAP, Google play billing, Alipay …
TCP, HTTP …
Syn/Asyn callback…
Heterogeneous
Network
Service
Process
Quality
Requirement
Scale
In/Out
New
Technologies
Budget
Control
Issues and Challenges
• Service quality standards
• Scalability and integrality
Require less upfront time to develop and configure.
Easy to integrate with existing service.
Easy to extend the service.
Zero tolerance to the billing failed.
Security provision
Alternative Proposals
• RabbitMQ
• ZeroMQ
High Performance
Erlang environment
Administrative burden
No message persistence
Success gurantee
Alternative Proposals
• ActiveMQ
• Redis Queue
High Performance
Drop dramatically with large size message
Hard to deep dive
JVM based and compatible with other J2EE container
Production IT Evaluations / Redis HA
1. Redis M/S with keepalived
2. Redis Sentinel (*)
3. Other 3rd Party Cluster Plans
Production IT Evaluations / Redis Cost VS Capacity
At least 2 instances,
¥ per month
How many operations per second (OPS) could the Redis
server sustain:
Throughput 50,598
Production IT Evaluations / SQS HA
Reliable
Amazon SQS runs within Amazon’s high-availability data
centers, so queues will be available whenever
applications need them. To prevent messages from
being lost or becoming unavailable, all messages are
stored redundantly across multiple servers and data
centers.
Scalable
Amazon SQS was designed to enable an unlimited
number of messaging services to read and write an
unlimited number of messages at any time.
Production IT Evaluations / SQS Cost VS Capacity
¥ per 1 million Amazon SQS Requests (¥
per SQS Request)
All data transfer in ¥ per GB
All data transfer out ¥ per GB (Promotional)
¥ gives you about 266 millions requests (1k per
request)
That is around millions per day (LOL)
Production IT Evaluations / Result
Final Solution
@GLU Beijing
© 2014 , Inc. and its affiliates. All rights reserved. May not be
copied, modified, or distributed in whole or in part without the express