[google-appengine] Re: WebSocket client and auto scaling

2020-09-24 Thread 'manu' via Google App Engine
Hi,

you could use another GAE service with maximum scaling = 1, which would act 
as a proxy to Discord for a new GAE bot service, which would continue 
scaling as before. The proxy service would just take the connection 
functionality from the old bot service and modify it minimally to forward 
the connections from the new bot service to discord using just one socket, 
and it shouldn't have much of an issue with workload even if the number of 
requests is considerable, as it is just relaying the information. The new 
bot service would have the connectivity logic adapted to this new setting.

You could also use a GCE instance instead of a GAE service for the proxy.

Best regards

On Tuesday, 22 September 2020 at 16:52:49 UTC+2 ledu...@gmail.com wrote:

> Hi,
>
> I'm using AppEngine Flexible for a Discord bot. The application needs to 
> keep one Web Socket connection to Discord Web Socket server. So, when the 
> application starts, it opens a Web Socket connection and keep connected 
> with Discord Web Socket server. 
>
> When the application is scaling up and running multiple instances at the 
> same time, it also establish multiple Web Socket connections to Discord Web 
> Socket server. In the result, the bot receive same events on multiple 
> instances and replies multiple identical messages.
>
> How can I make sure that the bot establish only one Web Socket connection 
> to Discord Web Socket server? 
>
> Best,
> Bao 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/110725a8-b6c4-4a9a-83f3-12b206eb0f1bn%40googlegroups.com.


[google-appengine] Re: Tasks: Guaranteed delivery time

2020-08-12 Thread 'manu' via Google App Engine
Hi,

as even though Cloud Tasks is not intended for real-time settings, this 
should not make premature triggering possible, so this looks like a 
malfunction. I didn't find documentation nor related cases about the 
premature triggering, either. I recommend you to ask for technical help in 
Issue Tracker [1].

Best regards
___
[1]:
https://issuetracker.google.com/

On Tuesday, 11 August 2020 22:51:34 UTC+2, Dominic Watson wrote:
>
> Instead of using a queue and to try and be as serverless as possible we 
> opted for using Cloud Tasks to schedule doing things in the future. For 
> tasks which don't require much accuracy for time it works really well and I 
> love it, but we're having an issue when we need them to be sent at a 
> precise time.
>
> We've got a growth function in JavaScript that looks like: *Math.pow(Math.E, 
> 0.6 * milliseconds) *and require a task to happen AT or slightly 
> AFTER a particular time but Cloud Tasks keeps calling us early. It's fine 
> if it's a little late as we already handle it but we're not prepared for 
> being called early.
>
> I know time synchronisation can be difficult but EVERYTHING is running in 
> a Google Cloud managed service:
>
> *Database:* Google Cloud SQL (PSQL)
> *App: *Google Kubernetes Engine
> *Tasks: *Google Cloud Tasks
>
> I would expect that each of the things in our stack are in sync to the 
> millisecond, but it seems not. Is there any article or documentation about 
> how early/late a task is expected to run at?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/4dddb81c-9b89-4a1b-be52-b5feb9de5a04o%40googlegroups.com.


[google-appengine] Re: Non http/https traffic to appengine

2020-04-08 Thread 'manu' via Google App Engine
Hello,

just to be sure, do you mean you want to ensure that traffic that is 
non-http (thus, it is https) is not allowed, and that traffic that is https 
is not allowed? So you mean you only want to allow http, and not allow 
https? Anyway, there is no default mechanism to do that using App Engine's 
infrastructure, it has to be done on the code level. Related to this, there 
is the documentation about forcing https [1].

App Engine has its own firewall, so, no, VPC firewall rules don't apply to 
it. You can configure its firewall, the documentation is this [2].

Best regards

[1]:
https://cloud.google.com/appengine/docs/flexible/go/how-requests-are-handled#forcing_https_connections
[2]:
https://cloud.google.com/appengine/docs/flexible/go/creating-firewalls

El divendres, 3 abril de 2020 20:39:49 UTC+2, Vishwanath T R va escriure:
>
> We want to ensure no non-http/https incoming traffic is allowed to 
> appengine. Is that something that appengine guarantees by default (for flex 
> environment)? Also do the VPC firewall rules for egress apply to app engine 
> also?
>
> Thanks
> Vish
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/7911421d-36cd-498c-994b-e9ea33d06138%40googlegroups.com.