最近一直在研究Scalability和Performance,没事就泡在InfoQ上,看了些文章,从中摘入了些比较赞同的观点:
performance and Scalability
Performance is about the resources used to service a single request.
Scalability is about how resource consumption grows when you have to
service more (or larger) requests.
We define performance as how rapidly an operation (or operations)
complete, e.g. response time, number of events processed per second,
etc; whilst scalability - this is how well the application can be
scaled up to handle greater usage demands (e.g. number of users,
request rates, volume of data).
Decrease processing time
Split Horizontally
Different use cases use different schemes for partitioning the data:
some are based on a simple modulo of a key (item ids ending in 1 go to
one host, those ending in 2 go to the next, etc.), some on a range of
ids (0-1M, 1-2M, etc.), some on a lookup table, some on a combination
of these strategies. Regardless of the details of the partitioning
scheme, though, the general idea is that an infrastructure which
supports partitioning and repartitioning of data will be far more
scalable than one which does not.
Avoid Distributed Transactions
The
pragmatic answer is to relax your transactional guarantees across
unrelated systems.It turns out that you can't have everything. In
particular,
guaranteeing immediate consistency across multiple systems or
partitions is typically neither required nor possible. The CAP theorem,
postulated almost 10 years ago by Inktomi's Eric Brewer, states that of
three highly desirable properties of distributed systems - consistency
(C), availability (A), and partition-tolerance (P) - you can only
choose two at any one time. For a high-traffic web site, we have to
choose partition-tolerance, since it is fundamental to scaling. For a
24x7 web site, we typically choose availability. So immediate
consistency has to give way.We do employ various techniques to help the
system reach eventual
consistency: careful ordering of database operations, asynchronous
recovery events, and reconciliation or settlement batches. We choose
the technique according to the consistency demands of the particular
use case.
Decouple Functions Asynchronously
The next key element to scaling is the aggressive use of asynchrony.
If component A calls component B synchronously, A and B are tightly
coupled, and that coupled system has a single scalability
characteristic -- to scale A, you must also scale B. Equally
problematic is its effect on availability. Going back to Logic 101, if
A implies B, then not-B implies not-A. In other words, if B is down
then A is down. By contrast, if A and B integrate asynchronously,
whether through a queue, multicast messaging, a batch process, or some
other means, each can be scaled independently of the other. Moreover, A
and B now have independent availability characteristics - A can
continue to move forward even if B is down or distressed.At every
level, decomposing the processing into stages or phases, and connecting
them up asynchronously, is critical to scaling.
Virtualize At All Levels
Virtualization and abstraction are everywhere, following the old
computer science aphorism that the solution to every problem is another
level of indirection. The operating system abstracts the hardware. The
virtual machine in many modern languages abstracts the operating
system. Object-relational mapping layers abstract the database.
Load-balancers and virtual IPs abstract network endpoints. As we scale
our infrastructure through partitioning by function and data, an
additional level of virtualization of those partitions becomes
critical.The motivation here is not only programmer convenience, but
also
operational flexibility. Hardware and software systems fail, and
requests need to be re-routed. Components, machines, and partitions are
added, moved, and removed. With judicious use of virtualization, higher
levels of your infrastructure are blissfully unaware of these changes,
and you are therefore free to make them. Virtualization makes scaling
the infrastructure possible because it makes scaling manageable.
Cache Appropriately
The
most obvious opportunities for caching come with slow-changing,
read-mostly data - metadata, configuration, and static data.More
challenging is rapidly-changing, read-write data. For the most part, we
intentionally sidestep these challenges at eBay.
Scalability Worst Practices
-
The Golden Hammer
Forcing a particular technology to work in ways it was not intended is sometimes counter-productive.
-
Resource Abuse
-
Dependencies
Dependencies are a necessary evil in most systems and failure to manage
dependencies and their versions diligently can inhibit agility and
scalability.
Dependency
management for code has different flavors:1) Compile the entire
codebase together 2) Pick and choose components and services based on
known versions 3)Publish models and services comprised of only
backwards-compatible changes
-
Forgetting to check the time
To properly scale a system it is imperative to manage the time alloted for requests to be handled.
-
Runtime
the ability to easily deploy and operate the system in a production
environment must be held in equal regard. There are a number of worst
practices which jeopardize the scalability of a system.
1)Hero Pattern
2)Not automating
3)Not Monitoring
NOSQL alternatives were built with the assumption that disks, machines,
and networks fail. We need to assume that we can’t prevent these
failures, and instead, design our system to cope with these failures
even under extreme scenarios
相关推荐
Each optimization discusses techniques to improve the performance and scalability of your code. Every claim is substantiated with hard numbers and an experience-based evaluation. Java(TM) Performance...
Java Performance and Scalability Volume 1
描述中的关键词“Scalability and Performance”再次强调了文档的核心关注点在于系统的可扩展性和性能优化。 #### 标签解析:websphere Scalability Performance 可扩展性 标签部分进一步强调了文档的重点领域:...
《WebSphere Application Server V6可扩展性和性能手册》是一本深度探讨IBM的WebSphere Application Server V6在大规模应用环境下的性能优化与可扩展性构建的专业书籍。这本书旨在帮助IT专业人员理解和解决在企业级...
Scalability是指系统、软件或应用程序能够满足增长和变化的需求,而不影响其性能和可靠性。Scalability是一个非常重要的概念,在现代软件开发和 IT 行业中扮演着关键角色。下面是从《The Art of Scalability》一书中...
学习java性能调优的好书,国外专家写的,很不错
### Elasticsearch的可伸缩性和性能注意事项 在大数据和实时搜索需求日益增长的今天,Elasticsearch作为一款基于Lucene的开源搜索引擎,凭借其强大的搜索能力、高性能和高扩展性,在众多场景下得到了广泛的应用。...
Improving .NET Application Performance and Scalability provides an approach to engineering applications for performance and scalability.
3. **工具和技术推荐**:针对不同的问题领域,书中可能会推荐一些实用的工具和技术栈,便于读者在实践中运用。 通过上述分析可以看出,《软件性能与可扩展性》这本书旨在为开发者提供一套全面而系统的指南,帮助...
Improving .NET Application Performance and Scalability <br>http://msdn.microsoft.com/en-us/library/ms998530.aspx
本文《A Performance and Scalability Metric for Virtual RDF Graphs》探讨了在语义网环境中对虚拟RDF图进行性能和可扩展性评估的方法。 #### 语义网与RDF 从理论角度看,语义网被理解为一系列层次结构,其中RDF是...
5. **性能vs可扩展性(Performance vs Scalability)**: - 如果系统对单个用户响应缓慢,可能是性能问题;如果系统对单个用户快速响应,但在高负载下变慢,则是可扩展性问题。 6. **延迟能力vs吞吐量(Latency vs ...
要了解更多关于ASP.NET和ASP.NET AJAX网站的性能和可扩展性提升策略,可以参考《使用ASP.NET 3.5构建Web 2.0门户》这本书。这些技术和实践将帮助你构建出能够应对高并发场景的健壮、高效的Web应用。
- **Performance**: 指的是系统在处理大量并发请求时的速度和响应时间。 - **Scalable**: 表示系统能够随着负载的增加而平滑地扩展其资源和服务能力。 - **Optimization**: 包括了一系列提高系统效率的方法和技术。 ...
Tableau服务器的可扩展性(Scalability)是指该服务器系统在面对不断增长的用户负载和数据量时,依然能够维持性能和稳定性,且能够通过增加硬件资源来按比例提升服务能力的特性。在本白皮书《Tableau服务器可扩展性...
Oracle Database Performance and Scalability – FreePdfBook
You will learn the importance of garbage collection and its behaviour,and discover how to profile your processor, allowing better performance and scalability. You will then learn about the different...