AWS ElastiCache: Types of Data You Can Store and Manage

  • ElastiCache for Redis:
    • Can handle different kinds of data like text, numbers, and lists of items.
    • Useful if you need to organize data in various ways, not just save single pieces of information.
  • ElastiCache for Memcached:
    • Mainly for storing single pieces of information and finding them quickly.
    • Good for simple needs like remembering a user's profile or speeding up commonly requested data.



Links:

Caching in on Performance: How Caching Mechanisms Transform Financial Systems

Coffee shop analogy illustrating caching in finance

Picture your favorite coffee shop, where the barista knows your order and hands it to you right away. Caching in finance works similarly, ensuring systems run efficiently and fast in both B2C and B2B scenarios. In this post, we'll demystify caching through relatable examples and explore mechanisms like CDN cache, application-level cache, and built-in database caches. Discover how caching powers seamless financial experiences, all while keeping things simple for non-technical readers.

Links:

Say Goodbye to apache-, php, and php-pecl-* packages in Amazon Linux 2023: Here's What to Do Next!

Why the Removal?

Amazon is always striving to improve its products, and that includes keeping software packages up-to-date and secure. The apache-, php, and php-pecl- packages were removed from Amazon Linux 2023 due to outdated software and compatibility issues. As technology advances, it's essential to stay on top of these changes to ensure the best possible experience.

Links:

Akamai vs. CloudFront: A Financial Industry Perspective on CDN Choices

Imagine walking into a bank with a long queue of customers waiting to be served. To handle the influx of people, the bank opens multiple teller windows to speed up the process. Content Delivery Networks (CDNs) work in a similar manner, distributing digital content across multiple servers worldwide to ensure rapid delivery. In the finance industry, where speed, reliability, and security are paramount, CDNs are essential.

Links:

Logrotate defaults

When inspecting why nginx logs wasn't rotated, I did little strange discover

# uncomment this if you want your log files compressed
# compress

so, by default rotated logs are not compressed. Perhaps there are admins which process rotated logs, but I am not one them. I use pre-rotate hook to process logs before rotate them. So, I really expected logrotate to compress by default. And yes, my bad - I didn't checked default configuration in /etc/logrotate.conf

Now I did change default to compress and wouldn't have to use in per service logrotate configuration.

PS: and don't forget

sudo /usr/sbin/logrotate -f /etc/logrotate.conf

after you apply changes to logrotate configurations

Tags:
Links:

optimization with memcached - is it simple to implement?

memcached is service which provide memory cache storage. It can provide access to cached object via network and it is extrimly fast!

memcashed pecl module is a way which can be used to access cache storage. How it work? It more complicated instead Cache_Lite, but it is fastest. This fact can be explain: Cache_Lite use file system to store cache objects.

Links:

PEAR::Cache_lite - speed, simplicity, security

One way to speed up web application is to lower database usage. Databases designed to provide very fast manipulation with data in files. Often developer use databases for everything and store session data, user files. This action make tables big and database server work slowly...

Links:

site optimization cases

Ever site have content for cache or pregenerate.

Why cache need to be part of optimization? - if you know what you do and how it is very fast way to lower server load. So, after load is lowered you will have time to think about logical optimization ;)

What we can cache?

  • content
  • sql results
  • functions results
  • logical results(which isn't design as separate functions)
Links:

Fast file transfer with pseudo HTTP server

Time to time I need to transfer site from server to server very quickly and have not common solution for this, because I have permissios.

Solution is to use http server if you have this one of server with backups or use netcat.
On server side I run

nc -l -p 8080 < mybackup.tar.gz

or
netcat -l -p 8080 < mybackup.tar.gz

and now can use wget, curl or browser for this url:
http://serveradress:8080

if you sent link to client it will best to do little more:

(echo -e "HTTP/1.1 200\nContent-Disposition: attachment; filename=mybackup.tar.gz\n
Content-Type: application/octet-stream\nConnection: close\n"; cat mybackup.tar.gz ) 
| nc -vv -l -p 8080

Links:

server security for sessions

most of PHP application use session module. Commonly to provide user authentication and most of hoster providers store session files in /tmp directory. Session files from all users/sites at one dir, it is big security risk!

Looks like /tmp is shared between users and used to store authentication information, really bad idea.

Session module allow to change default path for session files (configurable is strong PHP side), so it simple for webmasters and PHP coders to solve this problem, just need to change session path like this:

session_save_path('/home/your_own_dir/tmp');

or
ini_set('session.save_path', '/home/your_own_dir/tmp');

Links:
Syndicate content