Tuesday, August 28, 2018

find command find multiple extensions

find ./ -type f \( -iname \*.jpg -o -iname \*.png \)

php sending chunked encoding response

<?php
header("Transfer-encoding: chunked");
@apache_setenv('no-gzip', 1);
@ini_set('zlib.output_compression', 0);
@ini_set('implicit_flush', 1);
for ($i = 0; $i < ob_get_level(); $i++)  ob_end_flush();
ob_implicit_flush(1); flush();

function dump_chunk($chunk)
{
  printf("%x\r\n%s\r\n", strlen($chunk), $chunk);
  flush();
}

for ($i=0;$i<2;++$i) {
        $output = array();
        for ($i=0;$i<20;++$i) {
                $output[] = str_repeat("-=", 100);
        }
        dump_chunk(implode("\n", $output));
        usleep(500000);
}
dump_chunk("");
?>

Wednesday, August 8, 2018

Azure 70 534 notes

https://www.safaribooksonline.com/library/view/Exam+Ref+70-534+Architecting+Microsoft+Azure+Solutions/9780735697706/

Compute instances:
RDMA capable backend

Azure Batch and TVM
- for long running tasks

How do Homogeneous instances handle session replication?
- Sticky sessions
- External starte store(for e.g. redis)

Scheduled vs Reactive scaling (reactive means there will be some delay in scaling)
--------------
Azure Traffic Manager - redirects traffic based on round robin/performance etc. Triggered in DNS phase, so the actual traffic doesn't pass through it.






Blog Archive