Home     RSSRSS

Posts Tagged ‘Application Design’

Application Performance and Scalability

September 18, 2018 by kiranbadi1991 | Comments Off on Application Performance and Scalability | Filed in Development, Environment, Performance Engineering

Application performance is measured by service time (response time), latency, throughput, efficiency.

Depending on application needs, we describe performance as “how fast “can a given task or work can be completed by the program with the available computing resources.

Scalability means ability of the application to increase throughput or computing power of the program when additional resources (CPU/Disk etc) are given to the program.

Scalability and Application performance are two different things for the majority of the applications and almost all of the time they are at odds to each other and requires some level of tradeoffs. Designing the application for scalability often requires that we distribute the given set of work (tasks) across parallel threads or programs or computing resources so that all the given computing resources can be used by the programs so as to increase throughput.

Good example to understand this concept is deploying the some web application on a single server which hosts its database (Persistence), application server (Business layer), cache server (Service layer/persistence layer) etc. on the single machine. Since all the components of application are hosted on same machine, it’s bound to give very good performance (No network latency involved across any tier). However after a certain point, performance might start to deteriorate after reaching a certain threshold in terms of throughput. Once the threshold throughput is achieved. There is no way to increase the throughput since every tier is on same single server. However if we move the each of the layers on the different machines, then we might increase the throughput of the application, however this might decrease the performance of the application (Network latency involved here). It’s very rare case to see application performance and scalability go hand in hand.

Tags: , , , ,

Get and Post–Request Types

August 9, 2011 by kiranbadi1991 | Comments Off on Get and Post–Request Types | Filed in Browser, Performance Engineering, Quality, Scripting

As a performance Engineer, I often play around with http requests and have often come across various types of requests like Get, Put, and Post etc.All these types of requests serve unique purpose though they look similar in action. They are all part of the web requests where client initiates some kind of requests to the web servers and web servers do some kind of processing based on the type of the request and data associated with that request. Most the web is formed using Get and Post requests. These 2 types of the requests dominate the web irrespective of the programming languages used.

Sometimes there might be some situations where we as a performance engineer might need to play around with web requests so it makes more sense to understand basic purposes of those types of requests, below are the some of things I can think of,

Get Requests

  1. While Get requests are normally used to fetch some kind of the information for the end users from the backend web servers. They are more like “Read” where user’s action do not update or insert anything in the backend systems. For example you click on the link for some information, and you are redirected to that link.
  1. Gets requests normally do not have a very large query strings going along with it.
  1. Data passed over the Get requests can be viewed by anyone as it goes via wire. It’s insecure in nature. We got to secure it in case if we want to use Get requests.
  1. Since Get request are light weight in size, they are normally very good in term of performance unless we have a lot of hops in between.
  1. In case if you see a request with Query String with name/value pair, then its most likely to be a “Get” request. Query Strings in the URL in most of the cases are Get Requests. Data is mostly URL encoded with Get Requests.
  1. The length of the Bytes transmitted with the URL is limited in Get Requests. Should be around 400+Kb.
  1. Static content is usually fetched via Get Requests.

Post Request

  1. With post requests, we can read/insert/update/delete data in the backend systems.
  1. With Post Requests, Data flows as the part of the body of the request.
  1. Very large amount of bytes can flow across the wire. Good example of this is view states from .net web application.

4. They are secure as data flows as the body part of the request and in the manner as set in via content type attribute. But again it also depends on how your application designed.

  1. Dynamic Content or interactive content is normally fetched via Post Requests.
  1. Non ANSII or Binary data are normally fetched via Post requests.

Also browsers have their own way of handling Get and Post requests. The page with Get requests can be cached or Bookmarked easily with browsers whereas Post requests cannot be cached or bookmarked with Browsers.

These are some of the purposes of Get/Post requests I have seen while working with web applications build using technologies like .Net/J2EE/Open Source Web Platform. In order to get good response time and good user experience, it makes more sense to use the right type of the request in the call, so that application can leverage the inbuilt features of the browsers.

In case if you want to know and understand precise technical difference and purpose of these requests, I suggest you this link.

Tags: , ,