SDA Unit 1 - Chapter Performance & Security
SDA Unit 1 - Chapter Performance & Security
1
Software Architecture
Reference Book
2
Quality Attribute: Performance
3
Performance General Scenarios
4
Performance: Tactics
5
Performance: Tactics
• Goal of performance tactics is to generate a response to an event arriving at the system within
some time-based constraint
• Control resource demand
• tactic operates on the demand side to produce smaller demand on the resources that
will have to service the events
• Manage resources
• tactic operates on the response side to make the resources at hand work more
effectively in handling the demands put to them
6
Performance: Tactics
7
Performance: Tactics
• Reduce overhead
• use of intermediaries increases the resources consumed in processing an event stream, and so
removing them improves latency
• strategy for reducing computational overhead is to co-locate resources
• Co-location may mean hosting cooperating components on the same processor to avoid the time
delay of net
• Bound execution times
• Place a limit on how much execution time is used to respond to an event
• Ex: For iterative, data-dependent algorithms, limiting the number of iterations is a method for
bounding execution times work communication
• Increase resource efficiency
• Improving the algorithms used in critical areas will decrease latency
8
Performance: Tactics
• Manage Resources
• demand for resources is not controllable, the management of these resources can be
• Increase resources
• Faster processors, additional processors, additional memory, and faster networks all have the
potential for reducing latency
• Cost is usually a consideration in the choice of resources, but increasing the resources is
definitely a tactic to reduce latency and in many cases is the cheapest way to get immediate
improvement
• Introduce concurrency
• If requests can be processed in parallel, the blocked time can be reduced
• Concurrency can be introduced by processing different streams of events on different threads or
by creating additional threads to processs different sets of activities
• Maintain multiple copies of computations
• Multiple servers in a client-server pattern are replicas of computation
• Purpose of replicas is to reduce the contention that would occur if all computations took place
on a single server
• load balancer is a piece of software that assigns new work to one of the available duplicate
servers
9
Performance: Tactics
10
Performance: Tactics
• Scheduling Policies
• Scheduling policy conceptually has two parts: a priority assignment and dispatching
• All scheduling policies assign priorities. In some cases the assignment is as simple as first-in/first-out
(or FIFO). In other cases, it can be tied to the deadline of the request or its semantic importance
• Common scheduling policies
• First-in/first-out
• FIFO queues treat all requests for resources as equals and satisfy them in tum
• One possibility with a FIFO queue is that one request will be stuck behind another one that takes
a long time to generate a response
• Fixed-priority scheduling
• Fixed-priority scheduling assigns each source of resource requests a particular priority and
assigns the resources in that priority order
11
Performance: Tactics
• Measure of the system's ability to protect data and information from unauthorized
access while still providing access to people and systems that are authorized
• Action taken against a computer system with the intention of doing harm is called
an attack and can take a number of forms
• may be an unauthorized attempt to access data or services or to modify data,
or it may be intended to deny services to legitimate users
• Simplest approach to characterizing security has three characteristics
• Confidentiality, Integrity, Availability (CIA)
• Supporting CIA … Authentication, Nonrepudiation , Authorization
14
Security General Scenario
15
Security General Scenario
16
Security Tactics
17
Security Tactics
Detect Attacks
• Category consists of four tactics: detect intrusion, detect service denial, verify message integrity, and
detect message delay
• Detect intrusion
• comparison of network traffic or service request patterns within a system to a set of signatures or
known patterns of malicious behavior stored in a database
• Detect service denial
• comparison of the pattern or signature of network traffic coming into a system to historic profiles of
known denial-of-service attacks
• Verify message integrity
• employs techniques such as checksums or hash values to verify the integrity of messages, resource
files, deployment files, and configuration files
• Detect message delay
• intended to detect potential man-in-the-middle attacks, where a malicious party is intercepting (and
possibly modifying) messages
• By checking the time that it takes to deliver a message, it is possible to detect suspicious timing
behavior, where the time it takes to deliver a message is highly variable
18
Security Tactics: Resist Attacks
• Resist Attacks
• Identify actors
• Identifying "actors" is really about identifying the source of any external input to the system.
• Users are typically identified through: user IDs, access codes, IP addresses, protocols, ports
• Authenticate actors
• ensuring that an actor (a user or a remote computer) is actually who or what it purports to be
• Passwords, one-time passwords, digital certificates, and biometric identification provide a
means for authentication
• Authorize actors
• ensuring that an authenticated actor has the rights to access and modify either data or
services
• mechanism is usually enabled by providing some access control mechanisms within a system.
• Limit access
• Limiting access to computing resources involves limiting access to resources such as memory,
network connections, or access points
• may be achieved by using memory protection, blocking a host, closing a port, or rejecting a
protocol
19
Security Tactics: Resist Attacks
• Limit exposure
• minimizes the attack surface of a system
• focuses on reducing the probability of and minimizing the effects of damage caused by a hostile
action
• typically realized by having the least possible number of access points for resources, data, or
services and by reducing the number of connectors that may provide unanticipated exposure
• Encrypt data
• Data should be protected from unauthorized access. Confidentiality is usually achieved by applying
some form of encryption to data
• Separate entities
• Entities within the system can be done through physical separation on different servers that are
attached to different networks; the use of virtual machines and to communication
• Change default settings
• Many systems have default settings assigned when the system is delivered
• Forcing the user to change those settings will prevent attackers from gaining access to the system
through settings that are, generally, publicly available
20
Security Tactics : React to Attacks , Recover
• Revoke access
• If the system or a system administrator believes that an attack is underway, then access can be
severely limited to sensitive resources, even for normally legitimate users and uses
• Lock computer
• Repeated failed login attempts may indicate a potential attack
• Many systems limit access from a particular computer if there are repeated failed attempts to
access an account from that computer
• Legitimate users may make mistakes in attempting to log in
• Inform actors
• Ongoing attacks may require action by operators, other personnel, or cooperating systems
• Such personnel or systems the set of relevant actors must be notified when the system has
detected an attack
• Recover from Attacks
• Once a system has detected and attempted to resist an attack, it needs to recover
• Part of recovery is restoration of services
• maintain an audit trail - Keep a record of user and system actions and their effects to help trace
the actions of, and to identify, an attacker
21