Spring Cloud Kubernetes: Support for fail policy on the event that ConfigMap can’t be read - spring-cloud-kubernetes

Due to business requirements, we require the use of a Kubernetes client for an app running on Spring Boot 2.4. Whilst testing the ConfigMap loader (specified via a bootstrap file), we noticed that, in the event that the ConfigMap cannot be loaded, the app simply ignores this issue and continues the start-up process. For our requirements, our app must at least fail to start-up if it cannot load the ConfigMap.
At first glance, we didn’t see anything in the documentation suggesting a possible workaround to this… Then, going through older issues, we see that something similar to this has already been asked for (i.e. #411 ) but in the context of a retry policy.
We would like to know if there is, by any chance, a fail policy feature already being worked on?
If not, is there an already existing workaround for this?

There is already a PR here that will support this, via the fail-fast property. There are no estimates when it will be released, though; subscribe to the issue and get notified.

Related

Is anyone running the new Next.JS 12 middleware functions on Cloudflare's edge using workers?

Cloudflare's workers are an edge based Javascript execution environment. They seem to me to be the perfect place for executing Next.JS 12's middleware concept.
It surprises me therefore that I can't find much evidence of people doing this despite extensive searching. I'm particularly interested in the idea of using Cloudflare just to execute the middleware and potentially to hold the static elements of a Next.JS build, but then to fall back to a separate (full Node) hosting environment where a getServerSideProps or similar needs to be executed.
One of the drawbacks of Next's middleware is that to really take advantage of it, you need to be on Vercel's platform and whilst I've nothing against that platform, I'd like to at least feel like my app is portable.

Symfony2 slow RouterListener or Firewall

Our new Symfony2 application is running awfully slow in PRODUCTION. It's hosted on an m3.large EC2 instance.
I checked the profiler and the slowest part is either the routerlistener or the firewall http component. On first page load, the routerlistener chokes up and then on succeeding requests the Firewall components causes the hold up.
This happens to this application may be once a week and then just fixes itself which is really strange.
I've attached the profiler images below:
What I've tried so far:
Disable xdebug
Set realpath_cache_size to 4096K
Set realpath_cache_ttl to 7200
No shake. Any ideas?
Improved performance considerably simply by using APC.
I was trying to look for a proper fix for this in the application code since I was thinking that using caching is only a band-aid solution. I guess Symfony2 without any caching (APC/Memcache/Varnish/etc) in production is simply destined to fail.

Migration help Websphere BPM 8.0.1.3 to 8.5.6 (Redirection rule)

We are migrating from WebSphere BPM 8.0.1.3 to 8.5.6, our plan is to move application by application rather than in a big-bang. The idea would be that when we move an application to the new server, we would create an IHS rule which redirects the related URLs to the new server. That would mean that we keep some applications running on the old server while some are already migrated to the new one.
Is this possible to achieve? Or any other idea alternate to re writing IHS rules? Like make use of WebServer plugins?
Unfortunately, I don't think that your current approach is going to work well for you. I've outlined the various options for IBM BPM upgrades here. I see several major problems with your approach, all of which come down to the fact that many of the URLs used by IBM BPM contain no details about the context for the request.
The first issue I see IBM uses a portal for a given user's work. That is all their tasks across the various BPM solutions will appear in the same web UI. This URL is not different across the Process Applications in the install. This means that all your users are trying to get their task list by going to a url like - https://mybpmserver/portal. There isn't a way to understand the process app a given user may be working with in this context, so you don't know who to redirect to the new server.
The second issue is that users are able to work with multiple process apps, so even if the context was known in the above url, you would enter complexities with respect to users working in 2 different process apps unless both have been migrated.
The third issue is that BPM is essentially a state engine. IBM does not supply a way to "migrate" that state from an old install to a new install on a per Process App (PA) basis, you have to migrate all or none. Assuming "none" because it feels like you want to follow the drain approach in my article, then you have the problem that the URLs for executing a task do not have the PA context and therefore you won't know which server to direct which task to. That is for a given PA you will have tasks on both the old server which existed before the upgrade, and the new server which were created after the upgrade, but the URLs for these tasks will look essentially the same.
There are additional issues, but the main one comes down to properly understanding how the run time BPM engines work. Some of the above issues may be mitigated if you have a separate UI layer for presenting the tasks the users (my company make a portal replacement that can do this) which would permit it to understand the context of the tasks, but if you have this, then you can get the correct behavior in that code and not worry about WAS configuration settings.
You could use the plugin-cfg.xml merge tool on the two generated plugin-cfg.xml's. That way the WAS Plugin would always know which server had which applications.

ASP.NET 3.5: Is there a distinct advantage to having debug=true in a production environment?

All answers point to "no!". However, some people say having debugging enabled is convenient when errors occur on the server. I am not sure what they mean by this. Do people actually debug live server code? I honestly didn't even know you could. With the website I work on, we use ELMAH for error reporting. When a server error occurs, we are emailed a complete stack trace. After acquiring a rough idea of where and how the error occurred, I will open the local solution containing all the code that's currently deployed to the production environment and debug locally. I never actually debug the code on the server itself, so I am not sure what people mean by that.
I ask this because I just found out today while consolidating web.config XML that debug=true exists on in the staging and production environments' web.config files. It must have been this way for a few years now and I am wondering what benefits we will experience by turning it off. Could anything possibly depend on debugging being turned on that might break if shut off after being enabled for over two years since the beginning of the project?
It should be fine to turn it off, and you should get a slight performance boost. It sounds like you are doing the right thing using ELMAH. I cannot think of a good reason why you would want to have it turned ON in production... hope that helps.
The "advantage" that people are talking about is that when an error occurs on the site, the default asp.net error page will show you the actual line of code that failed. If you have debug=false, then you will not see any of that information. I think most who would recommend something like this either do not know about logging frameworks like ELMAH (and hence, cannot easily find the cause of errors on the site without this), or they have left it on the production machine in the beginning of the project while they are installing/testing the site, and then forgot to change it later.
However, with a proper logging framework in place, you can still get good error information behind the scenes without presenting it to your end-users in that way. In fact, you don't want to show that kind of information to end-users because a) they won't know what it means, and b) it could be a possible security issue if sensitive aspects of your code are shown (info that might help somebody find vulnerabilities).
All the System.Diagnostic library is depend from this flag. If you do not use any of this function, then probably you can not see any direct effect, but for see other effect and messages that come from debug functions you need to monitor at lease the windows log file.
Functions like Debug.Assert, and Debug.Fail are still active if you do not set the debug flag to off, and affect performance, and maybe create small issues that you never see if you do not check the windows system log file.
In our library that they are full with assert, the debug flag are critical.
Also with Debug flag to on, probably the compiler is not make optimization's that also affect performance.
Either an advantage or disadvantage depending on how you look at it is that Webresource.axd type files are not cached when debug="true". You've got the advantage of having the latest files every time and a disadvantage of having the latest files every time.
This is often true with other third party compression/combining type modules due to the fact that it is easier to debug non minified javascript etc so they usually only begin properly function once debug is disabled.

Flex Builder Endpoint Tokens

I'm trying to get a better understanding of how endpoints work. I've read this and have learned that the services.config is "baked" into the swf at compile time. In that article he references the tokens...
<endpoint uri="http://myServer:{server.port}{context.root}/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>
... where server.port, and context.root are the tokens. I guess what I'm wondering is what tokens are available to me, and if they act like variables can I set my own custom token?
Edit: We're moving to another development server soon. We have 2 main flex developers and when they check out projects from the repository we want their projects work work independently of each other... so I want to make sure the endpoint will get set correctly for each developers project location.
I would have though that, when compiled, the tokens would be hard coded into the app... this apparently is not the case, so using {server.name} worked for us.

Resources