Posts

Azure Blob Storage. Overview

Image
 Azure Blob Storage provides storage to build powerful cloud-native and mobile apps. It Optimizes costs with tiered storage for your long-term data, and flexibly scale up for high-performance computing and machine learning workloads. The following is an overview about this Microsoft technology.   Overview on what is Azure Blob storage Azure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that doesn't adhere to a particular data model or definition, such as text or binary data.  Image taken from Official Azure Blob page.         Accounts A storage account provides a unique namespace in Azure for your data. Every object that you store in Azure Storage has an address that includes your unique account name. The combination of the account name and the Blob Storage endpoint f

How long Apache tooks to process a request?

  Goal Retrieve from the Apache logs the time that the server processes a request. Problem To tracking through DataDog or other tool those slow requests performed by our web server it’s necessary to have in each Apache’s request log the following information: How long Apache took to process the request Solution Add to LogFormat configuration the directive %D to measure in microseconds the time each request is processed. If each virtual has already defined custom LogFormat it should be updated also. Because the intention is to parse the log entry my suggestion is to add a prefix to the log format. Then the directive would be prefixed for example by prefix->%D and the log will hold for example prefix->523484, Where: prefix->: A custom value defined by developer to be used by the parser. 523484: Value in microseconds of the request processing. The prefix must be defined in

Redis as cache for excel generation using Phpspreadsheet

Image
  Redis as cache for excel generation using Phpspreadsheet.   Generating excel files with Phpspreadsheet library is a common task in many projects. That library holds by default in memory the cells representation. In some cases, when the file to be generated is really BIG that default configuration provoke PHP memory limitation. Problem Memory limitation issues when generating really BIG excel files. The library by default loads the cells representation in memory and at some point it is susceptible to PHP's memory limitations.   F atal error allowed memory size of " M " bytes exhausted tried to allocate "N" bytes in "K" on line "L"     Solution It's created a cache implementation using Redis to be used by Phpspreadsheet for storing the excel cell representation.    How to use:   Before the initialization of any Spreadsheet instance it’s needed to indicate Phpspreadsheet that th