Tips for learning Azure in the new year

As 2020 is upon us, it's natural to take time and reflect back on the current year’s achievements (and challenges) and begin planning for the next year. One of our New Year’s resolutions was to continue live streaming software development topics to folks all over the world. In our broadcasts in late November and December, the Azure community saw some of our 2020 plans. While sharing, many others typed in the chat from across the world that they’d set a New Year’s resolution to learn Azure and would love any pointers.

When we shared our experiences learning Azure in the “early days,” we talked about the number of great resources (available at no cost) users can take advantage of right now, and carry their learnings into the new year and beyond. 

Here are a few tips for our developer community to help them keep their resolutions to learn Azure:

Create a free account: The first thing that you’ll need is to create a free account. You can sign up with a Microsoft or GitHub account and get access to 12 months of popular free services, a 30-day Azure free trial with $200 to spend during that period and over 25 services that are free forever. Once your 30-day trial is over, we’ll notify you so you can decide if you want to upgrade to pay-as-you-go pricing and remove the spending limit. In other words, no surprises here folks!
Stay current with the Azure Application Developer and languages page: This home page is a single, unified destination for developers and architects that covers Azure application development along with all of our language pages such as .NET, Node.js, Python, and more. It is refreshed monthly and your go-to-source for our SDKs, hands-on tutorials, docs, blogs, events, and other Azure resources. Check out our recent Python for Beginners series to jump right in.
Free Developer’s Guide to Azure eBook: This free eBook includes all the updates from Microsoft’s first-party conferences, along with new services and features announced since then. In addition to these important services, we drill into practical examples that you can use in the real world and included a table and reference architecture that show you “what to use when” for databases, containers, serverless scenarios, and more. There is also a key focus on security to help you stop potential threats to your business before they happen. You’ll also see brand new sections on IoT, DevOps, and AI/ML that you can take advantage of today. In the more than 20 pages of demos, you’ll be diving into topics that include creating and deploying .NET Core web apps and SQL Server to Azure from scratch, building on to the application to perform analysis of the data with Cognitive Services. After the app is created, we’ll make it more robust and easier to update by incorporating CI/CD using API Management to control our APIs and generate documentation automatically.
Azure Tips and Tricks (weekly tips and videos): Azure Tips and Tricks helps developers learn something new within a couple of minutes. Since inception in 2017, the collection has grown to over 230 tips and more than 80 videos, conference talks, and several eBooks spanning the entire universe of the Azure platform. Featuring a new weekly tip and video it is designed to help you boost your productivity with Azure, and all tips are based on practical real-world scenarios. The series spans the entire universe of the Azure platform from Azure App Services, to containers, and more. Swing by weekly for a tip or stay for hours watching our Azure YouTube playlist.
Rock, Paper, Scissors, Lizard, Spock sample application: Rock, Paper, Scissors, Lizard, Spock is the geek version of the classic Rock, Paper, Scissors game. Rock, Paper, Scissors, Lizard, Spock is created by Sam Kass and Karen Bryla.
The sample application running in Azure was presented at Microsoft Ignite 2019 by Scott Hanselman and friends. It’s a multilanguage application built with Visual Studio and Visual Studio Code, deployed with GitHub Actions, and running on Azure Kubernetes Service (AKS). The sample application also uses Azure Machine Learning and Azure Cognitive Services (custom vision API). Languages used in this application include .NET, Node.js, Python, Java, and PHP.
Microsoft.Source Newsletter: Get the latest articles, documentation, and events from our curated monthly developer community newsletter. Learn about new technologies and find opportunities to connect with other developers online and locally. Each edition, you’ll have the opportunity to share your feedback and shape the newsletter as it grows and evolves.

Additional resources

Here are some bonus tips to help you keep up with Azure as it changes:

Azure documentation is the most comprehensive and current resource you’ll find for all of our Azure services.
See how Microsoft does DevOps: Customers are looking for guidance and insights about companies that have undergone a transformation through DevOps. To that end, we are sharing the stories of four Microsoft teams that have experienced DevOps transformation, with guidance on lessons learned and ways to drive organizational change through Azure technologies and internal culture. The stories are aimed at providing practical information about DevOps adoption to developers, IT professionals, and decision-makers.
Azure Friday is a video series that releases up to three new episodes per week to keep up with the latest in Azure with hosts such as Scott Hanselman.

Quelle: Azure

Liveness and Readiness Probes

The scope of use
Liveness and Readiness probes are Kubernetes capabilities that enable teams to make their containerised applications more reliable and robust. However, if used inappropriately they can result in none of the intended benefits, and can actually make a microservice based application unstable. 
The purpose of each probe is quite simple and is described well in the OpenShift documentation here. The use of each probe is best understood by examining the action that will take place if the probe is activated. 

Liveness : Under what circumstances is it appropriate to restart the pod?
Readiness : under what circumstances should we take the pod out of the list of service endpoints so that it no longer responds to requests? 

Coupled with the action of the probe is the type of test that can be performed within the pod :

HTTP GET request – For success, a request to a specific HTTP endpoint must result in a response between 200 and 399.
Execute a command – For success, the execution of a command within the container must result in a return code of 0.
TCP socket check – For success, a specific TCP socket must be successfully opened on the container.

Liveness
I come from a background of real-time embedded systems applications that need to run for many years without service interruption. I have never been a huge fan of the universal computer fix: “switch it off and back on again.” So to use a liveness probe we must identify a suitable test from the three available options that will sensibly result in a requirement to perform a pod restart if the test fails. 
It is important to identify that the pod with the liveness probe attached is the pod that needs to be restarted. This means not running tests with the liveness probe that result in a transaction involving other containers in other pods. However, if we make the liveness probe too simple, it may never give a meaningful indication of the poor health of the container. Ultimately, liveness probes are not the only facility that should be used in the management and monitoring of complex microservices-based applications; a structured logging and monitoring capability should be designed into the architecture from the start. Something like Prometheus. 
As a simple example of the use of liveness probes, consider a web application server for a travel booking site. The application server responds to web site requests on URL endpoints such as /flights, /trains and /hotels. Each of these URL’s results in a transaction that will require interaction with further containerised applications that look up seat or room availability. They  may also perform tasks such as obtaining the users profile and looking up their frequent traveller points etc. In short, this is not a trivial transaction, and it involves multiple downstream interfaces. If we use one of the above URL endpoints as part of the liveness probe, then the result may be that we restart the container after a failure or slow response from one of the downstream services. The application server may be performing perfectly, but we may restart it for the wrong reasons. Alternatively, we look for a different endpoint to give an indication of pod health. Adding a new URL such as /health -which simply validates that the application server is operating and serving requests – is a more atomic test that will only result in restarting the pod if the application server is unable to respond to a simple request. 
The process of finding a credible liveness test is not yet complete, however. Having identified a suitable endpoint we now have to identify the appropriate parameters for the liveness test to ensure that it operates under the right circumstances. The parameters required for the configuration of a URL response test involve the following:

initialDelaySeconds – Number of seconds after the container has started before the probe is initiated.
periodSeconds – The delay between performing probes.
timeoutSeconds – Number of seconds of inactivity after which the probe times-out and the containerised application is assumed to be failing. Note that this parameter is not used with a probe that involves the execution of a command in the container. The user must find some alternative way to stop the probe, such as using the timeout command line utility.
failureThreshold – The number of times that the probe is allowed to fail before the liveness probe restarts the container (or in the case of a readiness probe marks the pod as unavailable).
successThreshold – The number of times that the probe must report success after it begins to fail in order to reset the probe process.

The initialDelaySeconds parameter must be set to an appropriate value at which the health check probe should begin. Given that the /health probe runs on the same application server platform as the other more resource consuming URL’s, the initial delay must be long enough to ensure that the health check URL will be active. Setting this value too high will leave a period of time during which the container applications are active and the probe is not. 
The periodSeconds parameter should be treated with care as this will dictate the frequency at which the Kubernetes platform probes the pod to see if it is successfully operating. Too aggressive a setting results in unnecessary workload, while too big a gap between probes results in long delays between probing actions. 
Probe Timing
The example below illustrates the probe in action through a timeline. The first probe is successful, but the second, third and fourth fail. Assuming a default setting of 3 for the failureThreshold the pod will restart after the failure of the fourth probe.

 
Assuming that a pod fails to start successfully, the lowest amount of time that can elapse before the pod is restarted due to the liveness probe is given by:
time = initialDelaySeconds + failureThreshold – 1 periodSeconds + timeoutSeconds
Under normal steady state operation, and assuming that the pod has operated successfully for a period of time, the initialDelaySeconds parameter becomes irrelevant. In such a case, the minimum amount of time that will elapse between a failure and a pod restart is given by:
time = failureThreshold – 1 periodSeconds + timeoutSeconds
As shown by the image below, the failure point can occur just before a probe occurs or just after a successful probe has occurred. If the periodTime is long such that there is minimal interference on the pod, then it is possible that the time before the pod restarts could result in almost an additional periodSeconds time interval being added before restart.

The failureThreshold parameter must be used with caution. If the parameter is set too high there is a danger that time is wasted while a pod has failed and it is not being restarted. If this parameter is set too low then there is a danger that the pod may be restarted prematurely if the pod comes under an unusually heavy load such that, while serving hotel and train booking requests, it does not respond to the health probe quickly enough. If this situation arises and the pod is restarted, then the system has lost part of the workload serving customer requests and more workloads will be placed on the remaining pods, which will make their overall performance spiral down further. 
Readiness
Everything stated above regarding liveness probes applies equally to readiness probes. The obvious difference is the end result when the probe takes action, and in the case of a readiness probe the action is to remove the pod from the list of available service endpoints. Under normal circumstances the endpoint reports all pods that support it as shown below:
oc get ep/node-app-slave -o json
{
“apiVersion”: “v1″,
“kind”: “Endpoints”,
…
“subsets”: [
{
“addresses”: [
{
“ip”: “10.128.2.147”,

After a readiness probe has been actioned the addresses line changes to:
oc get ep/node-app-slave -o json
{
“apiVersion”: “v1″,
“kind”: “Endpoints”,
…
“subsets”: [
{
“notReadyAddresses”: [
{
“ip”: “10.128.2.147”,

One of the obvious differences between a liveness probe and a readiness probe is that the pod is still running after a readiness probe has taken action. This means that the successThreshold parameter has a greater role to play. Even after taking the pod out of the list of endpoints, the readiness probe will continue to probe the pod. If the pod somehow manages to self-correct (perhaps due to the fact that it was temporarily under severe workload and unable to respond to the probes), then the pod may start to respond successfully to the probes. The default value for the successThreshold is just 1 so there only needs to be one successful probe response to cancel the period of isolation and add the pod back into the service endpoint list. Consequently, readiness probes act particularly well at giving the pod some breathing space to recover from being overwhelmed. 
Once again, the question must be asked – ‘Given the overall architecture of the application and the expected workloads, under which it must operate, what action do we want to take when a pod is overwhelmed?’ Similarly to unnecessary pod restarts that place additional workload on other pods within the system, temporarily taking a pod ‘out of service’ may simply indicate that the functionality of the application or the overall architecture needs a rethink in terms of how it behaves under load.
Taking a pod out of service
For a readiness probe, the failureThreshold parameter defines how many times the probe must fail before the pod is removed from the endpoint list. Consider the situation in which  a readiness probe has a failureThreshold of 5 and a default successThreshold of 1. In the diagram below the pod suffers three consecutive failures to respond the to probe, followed by one successful response (probe 5). This successful response resets the counter on failures such that a further sequence of five failures occur (probes 6 to 10) before the removal of the pod from the endpoint list at probe 10.

Returning a pod to service
For a readiness probe the successThreshold parameter works alongside the failureThreshold to define the circumstances under which the pod should be returned to the endpoint list. Obviously, the successThreshold parameter has no impact on a liveness probe. Consider the situation in which a readiness probe has a failureThreshold of 5 and a successThreshold of 3. In the diagram below the pod suffers a fifth failure to respond at probe number 5 resulting in the removal of the pod from the endpoint list. Note that the pod remained in the endpoint list through the period of time from probe 1 to probe 5 even though it was struggling to respond successfully. One further probe failures occur at probe 6 before the health of the pod improves and it responds successfully at probe 7. Since the successThreshold is set to three it takes a further two successful probe responses at probes 8 and 9 before the pod is returned to the endpoint list.

The minimum amount of time for which a pod can be returned to health but still not servicing requests is given by :
time = successThreshold – 1 periodSeconds
Consider an Istio Circuit Breaker
Many microservices-based applications will benefit from the introduction of Red Hat Service Mesh for the management, monitoring and observability of services. As a consequence it may be appropriate to introduce the Istio circuit breaker capability. This operates in a similar manner to the readiness probe, in that it will remove the poorly performing pods from the routing rules it manages. Istio can take more granular actions on pods, however. If one begins to fail, for example, Istio can turn the flow of traffic to that pod down to a trickle, then reopen the flow when performance improves. 
Conclusion
Liveness and readiness probes have a part to play in the reliable and efficient delivery of application services. By considering exactly what is being used as the probe and what action we want to take for failure and recovery, it is possible to make good use of probes to help to manage the continued delivery of a microservice application.
The post Liveness and Readiness Probes appeared first on Red Hat OpenShift Blog.
Quelle: OpenShift

Causa Facebook vs. Schrems: EuGH-Generalanwalt zweifelt am Privacy Shield

Das Instrument der Standardvertragsklauseln, mit dem Daten europäischer Nutzer in Drittländer wie die USA übertragen werden dürfen, sei zwar prinzipiell gültig, meint der EuGH-Topjurist Henrik Saugmandsgaard Øe in der Causa Schrems; trotzdem könne Facebook dazu verdonnert werden, darauf gestützte Übermittlungen zu unterlassen. Von Stefan Krempl (Max Schrems, Soziales Netz)
Quelle: Golem