一个每秒达到600百万TPS的零售金融平台架构

我总结的设计思想:不要多线程、一切都在内存中、顺序写硬盘

平台情况:
http://www.lmax.com/
4: Hardware  The 6 million TPS benchmark was measured on a 3Ghz dual-socket quad-core Nehalem based Dell server with 32GB RAM.
5: The team does not use the name Business Logic Processor, in fact they have no name for that component, just referring to it as the business logic or core services. I've given it a name to make it easier to talk about in this article.
6: Currently LMAX runs two Business Logic Processors in its main data center and a third at a disaster recovery site. All three process input events.
7: What's in a transaction
When people talk about transaction timing, one of the problems is what exactly is in a transaction. In some cases it's little more than inserting a new record in a database. LMAX's transactions are reasonably complex, more complex than a typical retail sale.
Placing an order in an exchange involves:
    checking the target market is open to take orders
    checking the order is valid for that market
    choosing the right matching policy for the type of order
    sequencing the order so that each order is matched at the best possible price and matched with the right liquidity
    creating and publicizing the trades made as a consequence of the match
    updating prices based on the new trades

资料:
原创视频:
http://www.infoq.com/presentations/LMAX-Disruptor-100K-TPS-at-Less-than-1ms-Latency
pdf下载地址:
http://qconsf.com/dl/qcon-sanfran-2010/slides/MartinThompson_and_MichaelBarker_LMAXHowToDoOver100KConcurrentTransactionsPerSecondAtLessThan1msLatency.pdf
martinfowler的解读:
http://martinfowler.com/articles/lmax.html
对martinfowler的解读的中文翻译
http://www.360doc.com/content/11/0902/13/1542811_145229724.shtml
对martinfowler解读的总结:
http://programmers.stackexchange.com/questions/96994/how-to-significantly-improve-java-performance
伪共享问题
http://java.dzone.com/articles/false-sharing
现代CPU每秒执行指令数
http://en.wikipedia.org/wiki/Instructions_per_second

开源项目:
http://code.google.com/p/disruptor/

猜你喜欢

转载自nihongye.iteye.com/blog/1671947