Magento Enterprise Edition can be scaled over any number of additional web servers. This allows handling a bigger number of concurrent requests by simply introducing new web nodes when the number of page views and visitors grows. Doubling the number of web nodes can provide a performance increase of over 90%.
Read more ►
Browse » Home » All posts
Magento: Handling Sessions
Magento Enterprise Edition uses PHP sessions to store customer session data.
The default method is to use the file system storage, which works well if you are using a single web server. Its performance can be improved by configuring the tmpfs in-memory partition to avoid extra hard drive I/O activity.
In a clustered environment with multiple web servers, the first option for handling sessions is to use a load balancer capable of associating client requests with specific web nodes based on the client IP or the client cookies. If you are in a clustered environment and not using a load balancer capable of the above-mentioned, it is necessary to share the session data among all web servers. Magento Enterprise Edition supports two additional session storage types that can be used in this case.
Though fully supported, storing session data in the database is not recommended as it puts an additional load on the main database, and therefore, requires a separate database server to efficiently handle multiple connections under load in most cases. However, storing session data in the database provides an advantage in case it's important to keep user sessions in case of any server crashes. Database-driven sessions will not be damaged when one or all servers in the cluster are down.
The memcached session storage is free of these disadvantages.
The memcached service can be run on one of the cluster servers to provide fast session storage for all web nodes of the cluster. Though, because of extra overhead processing compared to raw file system session files, the memcached session storage does not show any performance improvements when used in a single server configuration.
Read more ►
The default method is to use the file system storage, which works well if you are using a single web server. Its performance can be improved by configuring the tmpfs in-memory partition to avoid extra hard drive I/O activity.
In a clustered environment with multiple web servers, the first option for handling sessions is to use a load balancer capable of associating client requests with specific web nodes based on the client IP or the client cookies. If you are in a clustered environment and not using a load balancer capable of the above-mentioned, it is necessary to share the session data among all web servers. Magento Enterprise Edition supports two additional session storage types that can be used in this case.
Though fully supported, storing session data in the database is not recommended as it puts an additional load on the main database, and therefore, requires a separate database server to efficiently handle multiple connections under load in most cases. However, storing session data in the database provides an advantage in case it's important to keep user sessions in case of any server crashes. Database-driven sessions will not be damaged when one or all servers in the cluster are down.
The memcached session storage is free of these disadvantages.
The memcached service can be run on one of the cluster servers to provide fast session storage for all web nodes of the cluster. Though, because of extra overhead processing compared to raw file system session files, the memcached session storage does not show any performance improvements when used in a single server configuration.
Magento: Scalability
Magento Enterprise Edition is designed to be able to take advantage of a multi-server setup in a clustered environment. Web nodes are not limited to be of exactly the same type. There may be different nodes, such as frontend servers, static content and media servers, and a separate admin panel server each performing different tasks.
Read more ►
Megento: Working with JavaScript-II
Method 2: Use Hosted Scripts and Code Snippets To add code snippets or a link to hosted scripts, you need to include the code in a new static block. Then, use a frontend app to add the static block to your store.
Step 1: Add a New Static Block
Step 2: Create a New Frontend App
Step 3: Choose Where it Goes
Step 4: Verify that the Code Works
Read more ►
Step 1: Add a New Static Block
Step 2: Create a New Frontend App
Step 3: Choose Where it Goes
Step 4: Verify that the Code Works
Megento: Working with JavaScript-I
Method 1: Upload JavaScript Files
1. From the Admin panel, select Design > Theme Editor.
2. In the Theme Editor, below the thumbnail for the theme you are working with,
click Customize.
3. In the Theme Customization panel on the left, select Java Script Editor.
4. In the Theme JavaScript section, do the following:
a. Click the Browse Files button to select the JavaScript file from your computer. Repeat this step to add the path to every JavaScript file that you want to upload. To upload multiple JavaScript files, first add each file, and then upload them all at once—you don’t need to upload each file separately.
b. Click the Upload Files button to upload the JavaScript file to your store. After the file is uploaded, the JavaScript will be available to all pages.
5. Click the Save button to save your changes.
Read more ►
1. From the Admin panel, select Design > Theme Editor.
2. In the Theme Editor, below the thumbnail for the theme you are working with,
click Customize.
3. In the Theme Customization panel on the left, select Java Script Editor.
4. In the Theme JavaScript section, do the following:
a. Click the Browse Files button to select the JavaScript file from your computer. Repeat this step to add the path to every JavaScript file that you want to upload. To upload multiple JavaScript files, first add each file, and then upload them all at once—you don’t need to upload each file separately.
b. Click the Upload Files button to upload the JavaScript file to your store. After the file is uploaded, the JavaScript will be available to all pages.
5. Click the Save button to save your changes.
Megento: Working with JavaScript
Your store layout, design, and functionality can be customized using the design tools which are available from the Admin panel. However, if you have a working knowledge of JavaScript, you can make additional changes to enhance your store. Magento Go allows you to add your own custom JavaScript files to add client-side functionality – which is executed at the individual browser level, rather than on the server.
In this blog, you will learn how to work with JavaScript libraries, hosted scripts, and snippets of code to implement custom features for your Magento Go store. This material was written for frontend developers who have a working knowledge of JavaScript. If you would like to learn more, you can find a wealth of educational material online or at your favorite book store. Adding Custom Code There are two primary methods for adding custom JavaScript to your Magento Go store, and one you use depends on what you want to do.
Method 1: To implement custom code (.js file), hosted scripts, or JavaScript libraries (such as TypeKit, JQuery, or MooTools), use the Java Script Editor in the Theme Customization section.
Method 2: To add hosted scripts or invoke custom snippets of code, add the code to a static block and use a Frontend App to make the code available to the appropriate pages.
Read more ►
In this blog, you will learn how to work with JavaScript libraries, hosted scripts, and snippets of code to implement custom features for your Magento Go store. This material was written for frontend developers who have a working knowledge of JavaScript. If you would like to learn more, you can find a wealth of educational material online or at your favorite book store. Adding Custom Code There are two primary methods for adding custom JavaScript to your Magento Go store, and one you use depends on what you want to do.
Method 1: To implement custom code (.js file), hosted scripts, or JavaScript libraries (such as TypeKit, JQuery, or MooTools), use the Java Script Editor in the Theme Customization section.
Method 2: To add hosted scripts or invoke custom snippets of code, add the code to a static block and use a Frontend App to make the code available to the appropriate pages.
What is Code Tracing?
Think of a black box flight recorder; when something goes wrong with an airplane, the problem is not actually reproduced. Instead, the flight recorder captures the complete data that flight analysts may need in order to understand why the problem occurred. Zend Server does the same for PHP applications. Rather than spending time on trying to set up the environment and reproduce all the steps that led up to the failure, Zend Server captures the full execution of the application in real-time – in production or in the test lab – so root cause can quickly be identified. Code tracing can be activated automatically to capture problems when they occur in real time, or manually by the user for specific requests. Code tracing captures the following data:
* Function calls: every function called as part of a request, represented as a time-synchronized tree based function execution flow.
* Arguments and return values: all arguments and return values passed into and returned from functions in the traced request
* Duration: breakdown of execution time at the function level – particularly useful for identification of performance problems
* Memory usage: for every executed function, the memory it consumes – allowing easy identification of functions with abnormal memory consumption or memory leaks
* File name and line of code: for each function call, the file name and exact line of code from which the function was called
The trace displayed in the Zend Server web console functions like a DVD player, showing the recorded execution history of the application. Users can follow the footsteps of a single problematic request in order to quickly pinpoint the root cause of the problem.
Read more ►
* Function calls: every function called as part of a request, represented as a time-synchronized tree based function execution flow.
* Arguments and return values: all arguments and return values passed into and returned from functions in the traced request
* Duration: breakdown of execution time at the function level – particularly useful for identification of performance problems
* Memory usage: for every executed function, the memory it consumes – allowing easy identification of functions with abnormal memory consumption or memory leaks
* File name and line of code: for each function call, the file name and exact line of code from which the function was called
The trace displayed in the Zend Server web console functions like a DVD player, showing the recorded execution history of the application. Users can follow the footsteps of a single problematic request in order to quickly pinpoint the root cause of the problem.
Subscribe to:
Posts (Atom)