自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(56)
  • 收藏
  • 关注

原创 缓存雪崩

缓存雪崩是指由于缓存层数据在同一时间大面积失效,或者缓存层宕机等原因,造成大量请求涌向后端持久层(DB),造成持久层过载而崩溃。       这种情况可以尽量将缓存数据的失效时间设置长一些,同时选择在业务低峰时间段(比如凌晨)全量更新缓存数据。对持久层的访问设置流控,也可以起到保护持久层的作用。

2017-03-26 19:29:58 618

原创 缓存失效

如果大量的数据在同一时间加载进缓存,而设置的缓存过期时间又一样(比如都是5分钟过期),就会造成同一时间有大量的缓存失效,需要去持久层(DB)重新加载数据,会对数据库造成很大的压力。        这种情况下,首先想到的就是将数据的缓存失效时间尽量分开,比如可以在默认的失效时间基础上加上一个范围可控的随机数。

2017-03-26 19:12:37 450

原创 缓存并发

在高并发场景下,如果缓存中的某条数据失效,就会出现多个相同Key的请求同时查询持久层(DB),并且同时将这个Key对应的value保存到缓存中的情况。不但频繁更新缓存,而且使数据库压力大,出现过载风险。        这种情况可以给缓存对应的数据上锁,其它相同Key的请求等待第一条请求Key从持久层更新好缓存后,再从缓存中查询。但是这种方式会造成其它请求等待,可以根据实际情况决定是否让其它请求

2017-03-26 19:03:16 675

原创 缓存穿透

在项目中使用缓存,请求数据在缓存中没有查询到,就会去持久层(DB)查询,然后在返回数据给请求方的同时,会将数据同步存放在缓存中,以便下次相同数据请求的时候,快速响应并减轻持久层的压力。但是如果该请求数据在持久层也没有查询到,就不会有返回结果存放到缓存中,因此该请求每次都会重复的到持久层查询,使缓存没有起到应有的效果,从而加重了整个系统的压力。        为了防止缓存穿透,可以将空的响应请求

2017-03-26 15:24:36 609

原创 为什么市场利率涨,国债价格跌?

在一些财经报道中,经常会看到由于市场一致认为美联储加息预期非常强烈,导致美国国债价格持续走低。市场利率上升,为什么会打压国债价格呢?      债券除了有票面价格,还有一个票面利率,即债券的到期收益率。国债的利率在发行时就已经确定(一般是参考国债发行时的市场利率)。      以1年期国债为例,假设现在一年期国债票面价格为100,票面利率和市场利率都为10%(实际上票面利率会略高于发行时的

2017-03-12 22:26:01 4074

转载 你什么都没错,只是太老了。

我从业到现在已经十年多了,这个问题是我从业五到七八年时最苦恼的话题。当时觉得这个世界太不友好了,互联网这个行业全是年轻人,30岁以上就压力非常大,我缓解这种压力的方式就是每个周末必须得去做一些我认为比较有意义的事。说到底是因为内心有恐慌,担心有一天会失业,如果失业了一定要给自己找一个后路或者给自己备一技之长,不会因为被互联网淘汰之后收入就锐减。一、职业焦虑的表层分析为什么会有这样的

2017-03-12 18:17:30 2321

转载 Windows Server 2012 R2 桌面化详细设置图解

一、任务栏左下角启动服务器管理器,然后进行设置。1、登录不显示服务器管理器 2、本地服务器,看到右边的IE增强的安全配置,如图所示,关闭两项内容。这样就关闭了IE增强安全提示框。 3、“工具”菜单,启动“服务”,启动两项声音服务(Windows Audio\Windows Audio Endpoint Builder),并设为自动属性。 4、“管理”菜单,添加服务器

2017-03-12 18:12:23 33014

原创 The difference between VNLS_PARAMETERS and NLS_DATABASE_PARAMETERS

V$NLS_PARAMETERS contains current values of NLS parameters.NLS_DATABASE_PARAMETERS lists permanent NLS parameters of the database.

2017-03-12 18:10:59 465

原创 Configurating PLSQL using oracle instant client

1. Download oracle instant clienthttp://www.oracle.com/technetwork/database/features/instant-client/index-097480.htmlFor downloading from oracle official website,you need a account first. After yo

2017-03-12 18:09:04 495

原创 Blank space issue in tns names ora

ORA11G = /** No blank space at left. **/ (DESCRIPTION = /** have blank space or not at left is ok. **/ (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521)) /** must have blank space a

2017-03-12 18:06:15 325

原创 Allow only specific IPs access in tomcat

you can add the following configuration to server.xml:Host name="localhost" autoDeploy="true" unpackWARs="true" appBase="webapps"> Valve className="org.apache.catalina.valves.RemoteAddrValve" de

2017-03-12 18:04:21 303

原创 direct,direct-vm,seda,vm of Apache Camel Component

Direct ComponentThe direct: component provides direct, synchronous invocation of any consumers when a producer sends a message exchange. This endpoint can be used to connect existing routes in the

2017-03-12 17:43:53 682

转载 Chapter 7. Message Routing

AbstractThe message routing patterns describe various ways of linking message channels together. This includes various algorithms that can be applied to the message stream (without modifying the bod

2017-03-12 17:42:42 338

转载 6.3. Return Address

Return AddressApache Camel supports the Return Address from the Introducing Enterprise Integration Patterns using the JMSReplyTo header.  For example when using JMS with InOut, the component wil

2017-03-12 17:42:13 518

转载 6.2. Event Message

Event MessageCamel supports the Event Message from the Introducing Enterprise Integration Patterns by supporting the Exchange Pattern on a Message which can be set to InOnly to indicate a oneway eve

2017-03-12 17:41:44 531

转载 6.1. Correlation Identifier

OverviewThe correlation identifier pattern, shown in Figure 6.1, “Correlation Identifier Pattern”, describes how to match reply messages with request messages, given that an asynchronous messaging s

2017-03-12 17:41:09 310

转载 Chapter 6. Message Construction

AbstractThe message construction patterns describe the various forms and functions of the messages that pass through the system.

2017-03-12 17:40:31 256

转载 5.5. Message Bus

OverviewMessage bus refers to a messaging architecture, shown in Figure 5.5, “Message Bus Pattern”, that enables you to connect diverse applications running on diverse computing platforms. In ef

2017-03-12 17:39:50 917

转载 5.4. Guaranteed Delivery

OverviewGuaranteed delivery means that once a message is placed into a message channel, the messaging system guarantees that the message will reach its destination, even if parts of the application

2017-03-12 17:39:07 373

转载 5.3. Dead Letter Channel

OverviewThe dead letter channel pattern, shown in Figure 5.3, “Dead Letter Channel Pattern”, describes the actions to take when the messaging system fails to deliver a message to the intended recipi

2017-03-12 17:38:33 645

转载 5.2. Publish-Subscribe Channel

OverviewA publish-subscribe channel, shown in Figure 5.2, “Publish Subscribe Channel Pattern”, is a message channel that enables multiple subscribers to consume any given message. This is in contras

2017-03-12 17:37:51 835

转载 5.1. Point-to-Point Channel

OverviewA point-to-point channel, shown in Figure 5.1, “Point to Point Channel Pattern” is a message channel that guarantees that only one receiver consumes any given message. This is in contrast wi

2017-03-12 17:37:24 541

转载 Chapter 5. Messaging Channels

AbstractMessaging channels provide the plumbing for a messaging application. This chapter describes the different kinds of messaging channels available in a messaging system, and the roles that they

2017-03-12 17:36:43 177

转载 4.6. Message Translator

OverviewThe message translator pattern, shown in Figure 4.8, “Message Translator Pattern” describes a component that modifies the contents of a message, translating it to a different format. You can

2017-03-12 17:36:10 330

转载 4.5. Message Router

OverviewA message router, shown in Figure 4.7, “Message Router Pattern”, is a type of filter that consumes messages from a single consumer endpoint and redirects them to the appropriate target endpo

2017-03-12 17:35:34 689

转载 4.4. Pipes and Filters

OverviewThe pipes and filters pattern, shown in Figure 4.4, “Pipes and Filters Pattern”, describes a way of constructing a route by creating a chain of filters, where the output of one filter is fed

2017-03-12 17:34:58 441

转载 4.3. Message Endpoint

OverviewA message endpoint is the interface between an application and a messaging system. As shown in Figure 4.3, “Message Endpoint Pattern”, you can have a sender endpoint, sometimes called a prox

2017-03-12 17:34:21 481

转载 4.2. Message Channel

OverviewA message channel is a logical channel in a messaging system. That is, sending messages to different message channels provides an elementary way of sorting messages into different message ty

2017-03-12 17:33:43 407

转载 4.1. Message

OverviewA message is the smallest unit for transmitting data in a messaging system (represented by the grey dot in the figure below). The message itself might have some internal structure—for exampl

2017-03-12 17:33:07 258

转载 Chapter 4. Messaging Systems

AbstractThis chapter introduces the fundamental building blocks of a messaging system, such as endpoints, messaging channels, and message routers.

2017-03-12 17:32:25 330

转载 3.1. Overview of the Patterns

Enterprise Integration Patterns bookApache Camel supports most of the patterns from the book, Enterprise Integration Patterns by Gregor Hohpe and Bobby Woolf.Messaging systemsThe messaging syste

2017-03-12 17:31:52 234

转载 Chapter 3. Introducing Enterprise Integration Patterns

AbstractThe Apache Camel’s Enterprise Integration Patterns are inspired by a book of the same name written by Gregor Hohpe and Bobby Woolf. The patterns described by these authors provide an excelle

2017-03-12 17:31:03 247

转载 2.13. Performance and Optimization

Avoid unnecessary message copyingYou can avoid making an unnecessary copy of the original message, by setting the allowUseOriginalMessage option to false on the CamelContext object. For example, in

2017-03-12 17:30:17 218

转载 2.12. JMX Naming

OverviewApache Camel allows you to customise the name of a CamelContext bean as it appears in JMX, by defining a management name pattern for it. For example, you can customise the name pattern of an

2017-03-12 17:29:31 190

转载 2.11. Scheduled Route Policy

11.1. Overview of Scheduled Route PoliciesOverviewA scheduled route policy can be used to trigger events that affect a route at runtime. In particular, the implementations that are currently avail

2017-03-12 17:28:50 342

转载 2.10. Controlling Start-Up and Shutdown of Routes

OverviewBy default, routes are automatically started when your Apache Camel application (as represented by the CamelContext instance) starts up and routes are automatically shut down when your Apach

2017-03-12 17:28:09 276

转载 2.9. Threading Model

Java thread pool APIThe Apache Camel threading model is based on the powerful Java concurrency API, java.util.concurrent, that first became available in Sun’s JDK 1.5. The key interface in this API

2017-03-12 17:27:26 735

转载 2.8. Aspect Oriented Programming

OverviewThe aspect oriented programming (AOP) feature in Apache Camel enables you to apply before and after processing to a specified portion of a route. As a matter of fact, AOP does not provide an

2017-03-12 17:26:52 220

转载 2.7. Property Placeholders

OverviewThe property placeholders feature can be used to substitute strings into various contexts (such as endpoint URIs and attributes in XML DSL elements), where the placeholder settings are store

2017-03-12 17:26:15 339

转载 2.6. Transforming Message Content

AbstractApache Camel supports a variety of approaches to transforming message content. In addition to a simple native API for modifying message content, Apache Camel supports integration with severa

2017-03-12 17:25:38 243

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除