Skip to main content

Posts

Showing posts from April, 2014

Sticky Session

Sticky session means that when a request comes into a site from a client all further requests go to the same server initial client request accessed. I believe that session affinity is a synonym for sticky session. Both mean that when coming in to the load balancer, the request will be directed to the server that served the first request (and has the session). The problem is "sticky session" where each user is assigned to a single server and his/her state data is contained on that server exclusively throughout the duration of the session. Pros it's easy-- no app changes required. better utilizes local RAM caches (e.g. look up user profile once, cache it, and can re-use it on subsequent visits from same user) Cons ·   if the server goes down, session is lost. (note that this is a con of storing session info locally on the web server-- not of sticky sessions per se). if what's in the session is really important to the user (e.g. a

Statefull Architecture

Stateful means the computer or program keeps track of the state of interaction, usually by setting values in a storage field designated for that purpose. The client connects to the server, conducts a series of operations via that conneciton, and then disconnects.Then server can associate all of the requests together and knows that thy all came from the same user.

Stateless Architecture

Stateless means there is no record of previous interactions and each interaction request has to be handled based entirely on information that comes with it. In computing, a stateless protocol is a communications protocol that treats each request as an independent transaction that is unrelated to any previous request so that the communication consists of independent pairs of requests and responses. A stateless protocol does not require the server to retain session information or status about each communications partner for the duration of multiple requests. The Internet's basic protocol, the Internet Protocol ( IP ), is an example of a stateless interaction. Each packet travels entirely on its own without reference to any other packet. When you request a Web page from a Web site, the request travels in one or more packets, each independent of the other as far as the Internet Protocol program itself is concerned. (The upper layer Transmission Control Protocol - TCP -

Facts about Tablespaces in PostgreSQL

Two tablespaces are automatically created when the database cluster is initialized. pg_global - this tablespace is used for shared system catalogs. pg_default -this tablespace is the default tablespace of the template1 and template0 databases (and, therefore, will be the default tablespace for other databases as well, unless overridden by a TABLESPACE clause in CREATE DATABASE). Once created, a tablespace can be used from any database, provided the requesting user has sufficient privilege. This means that a tablespace cannot be dropped until all objects in all databases using the tablespace have been removed. Creation of the tablespace itself must be done as a database superuser, but after that you can allow ordinary database users to use it. To do that, grant them the CREATE privilege on it . CREATE TABLESPACE fastspace LOCATION ’/mnt/sda1/postgresql/data’; The location must be an existing, empty directory that is owned by the PostgreSQL operating system user. All obj