What is a Throughput?
The amount of work done by an application as a ratio of time spent in GC. Target throughput with -XX:GCTimeRatio=99; 99 is the default equating to 1% GC time.
What is Latency?
The time taken by systems in responding to events which is impacted by pauses introduced by garbage collection. Target latnecy for GC pauses with -XX:MaxGCPauseMillis=<n>
Latency is a distribution across events. It may be acceptable to have an increased average latency to reduce the worst-case latency, or make it less frequent. We should not interpret the term “real-time” to mean the lowest possible latency; rather real-time refers to having deterministic latency regardless of throughput.
For some application workloads, throughput is the most important target. An example would be a long running batch-processing job; it does not matter if a batch job is occasionally paused for a few seconds while garbage collection takes place, as long as the overall job can be completed sooner.
For virtually all other workloads, from human facing interactive applications to financial trading systems, if a system goes unresponsive for anything more than a few seconds or even milliseconds in some cases, it can spell disaster. In financial trading it is often worthwhile to trade off some throughput in return for consistent latency. We may also have applications that are limited by the amount of physical memory available and have to maintain a footprint, in which case we have to give up performance on both latency and throughput fronts.
What’s a Session ID?
Session ID is a persistent authentication token. It functions just like a badge that you might have in your own workplace. When you walk into the building, you swipe your badge to authenticate yourself to the door, which will open if you have the right permissions. It’s something you carry around with you all day. Every time you need to get into the server room, you swipe your badge. The same requirement exists in web applications, so that every time you make a request to see your account balance, you should be required to provide the session ID.
@Async not working when invoked from within a method [SOLVED]
So, I ran into this scenario and the solution is to use a separate initializing Spring bean that invokes the @Async annotated method on the target.
#SpringFramework 3.1 - @Async Not Working [SOLVED]
Requirement - Run a method asynchronously such that the call returns immediately.
So, I was using Spring Framework’s @Async annotation to do the job. I ran into a scenario where the method was running synchronously instead of asynchrously. I followed the Spring reference documentation and everything was in sync. But still no luck. Then I came across the below stackoverflow question which shed light on my problem.
Solution - Is to make sure the context loading (through component scan) is not clashing/or overridden in the child context (i.e. servlet-context.xml). We need to make sure we exclude the file by using exclude-filter (type - regex) in the <context-component-scan> element in the servlet-context.xml file.
Spring Reference Documentation