Servlet and filter mappings in web.xml are converted to handlers as they 
are represented in app.yaml by other runtimes.  Static includes/excludes in 
appengine-web.xml are also converted to handlers of a similar format.  The 
source code showing how these are processed can by found in 
*<gcloud-sdk-dir>/platform/google_appengine/google/appengine/tools/handler.py*
.

   - Line 181 defines *OverlappedHandler* which shows how some of the paths 
   found in both xml files can be combined into a single handler.
   - Line 245 defines *GetOrderedIntersection* which explains how mappings 
   in web.xml are converted into an ordered list of handler objects.
   
Depending on what includes and mappings exist in your configuration xml 
files, the conversion into app.yaml-like handlers may not be a 1:1 ratio. 
 I'd recommend reading through that source if the details of how paths are 
combined is the information you seek.  Nevertheless, given the config files 
you've provided, my standing recommendation remains to break down your 
service into small "microservices" to have more URLMap "breathing room" and 
to take advantage of independent scaling/load balancing.

On Tuesday, February 28, 2017 at 3:50:12 AM UTC-5, Joshua Fox wrote:
>
> Thank you. What is the role of 
>
>              <include path="**"/>
>
> Does that count as one URLMap or does that somehow expand so that every 
> JSP and/or every  file gets counted as one URLMap?
>
> On Mon, Feb 27, 2017 at 11:21 PM, 'Nicholas (Google Cloud Support)' via 
> Google App Engine <[email protected]> wrote:
>
>> Hey there,
>>
>> Thanks for providing me with your *appengine-web.xml* and *web.xml*.  At 
>> the moment, the platform limits the number of *URLMap* handlers to *100*.  
>> This can be found in the *appinfo.py* file in your own gcloud SDK 
>> installation (
>> *<your-cloud-sdk-dir>/platform/google_appengine/google/appengine/api/appinfo.py*
>>  
>> on line *2089*).  The definition of *URLMap* can be found in the same 
>> find with a helpful description on line *917*.
>>
>> When it comes to Java applications, filter mappings, servlet mappings are 
>> the main contributors to URLMap handlers.  Basically, any entry that maps a 
>> URL to an endpoint will be a URLMap.  Looking at some of your servlet 
>> mappings, you may be able to save some maps in the following ways
>>
>>    - Break down the application into many smaller services.  Your REST 
>>    API servlet(s) for instance could be deploy as a separate service, thus 
>>    taking advantage of the subdomain URL-naming scheme of App Engine 
>> services 
>>    like api.your-domain.com/v1/useful-method.  Essentially, the change 
>>    requires that part of the URL be moved from the path to the subdomain.
>>    - Use a CDN or Cloud Storage to serve static resources.  In your 
>>    appengine-web.xml, I could see several <include>.  Cloud Storage is an 
>>    excellent service for serving static resources.
>>    - In some cases, a single servlet could serve related paths such as 
>>    /_ah/*.  This example can save you from having 3 single endpoints 
>> mappings 
>>    for /_ah/start, /_ah/health, /_ah/stop.
>>    
>> I hope this addresses your questions and helps you trim down some URL 
>> mappings.
>>
>> On Friday, February 24, 2017 at 4:02:13 PM UTC-5, Nicholas (Google Cloud 
>> Support) wrote:
>>>
>>> There does not seem to be any explicit documentation about the URLMap 
>>> limitations for GAE nor a breakdown of which XML elements count towards 
>>> this limit.  The most relevant documentation I could find is the HTTP/S 
>>> load balancer documentation about URL Maps 
>>> <https://cloud.google.com/compute/docs/load-balancing/http/url-map> and 
>>> the URLMap resource definition 
>>> <https://cloud.google.com/compute/docs/reference/beta/urlMaps>.  These 
>>> are documented in the context of the a load balancer and not an App Engine 
>>> application.  The load balancer documentation does not describe which XML 
>>> elements <filter-mapping>, <servlet-mapping>, etc. nor which app.yaml 
>>> handlers count as a URLMap.
>>>
>>> I can't define what constitutes a URLMap until I dig into this a little 
>>> deeper.  I suspect this will lead to feedback for our documentation team.  
>>> For the time being, perhaps we can help identify opportunities to reduce 
>>> the number of maps you have using more comprehensive regular expressions 
>>> and such.  If sensitive and not redacted, feel free to reply privately to 
>>> me here with your web.xml and I'll see what I can do to help.
>>>
>>> On Thursday, February 23, 2017 at 4:53:29 AM UTC-5, Joshua Fox wrote:
>>>>
>>>> Where can I find documentation on URLMap count, as reflected in this 
>>>> error in deployment to GAE?
>>>>
>>>>           "app.yaml... Found more than 100 URLMap entries in 
>>>> application configuration"
>>>>
>>>> What is included in the URLMap count?
>>>>
>>>> Which elements in *web.xml *are included? *servlet-mapping*, 
>>>> *security-constraint*, *filter-mapping*, or something else? 
>>>>
>>>> Which elements in *appengine-web.xml ? *
>>>>
>>>> For some reason, removing *<include path="**"/> *from 
>>>> *appengine-web.xml *actually allows deployment for us. Does that path 
>>>> count as a single URLMap? Or as one per static  file? Per JSP?
>>>>
>>> -- 
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/google-appengine.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/google-appengine/b08cff4d-b9f6-4a7b-b42a-0adc3eda0d51%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/google-appengine/b08cff4d-b9f6-4a7b-b42a-0adc3eda0d51%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> *JOSHUA FOX*
> Principal Software Architect | Freightos
>
>
> ☏* (Israel): *+972-545691165 | ☏* (US)*:  +1-3123400953* | Skype*: 
> joshuafox.freightos
> Smoother shipping with the world's online freight marketplace.
> Online Marketplace 
> <https://www.google.com/url?q=https%3A%2F%2Fwww.freightos.com%2Fcompare-book-manage-freight-quotes%2F&sa=D&sntz=1&usg=AFrqEzfMkBQBWsovNlg47sIDORa5FpHDkQ>
>  / In the News 
> <https://www.google.com/url?q=https%3A%2F%2Fwww.freightos.com%2Fabout-us%2Fin-the-news%2F&sa=D&sntz=1&usg=AFrqEzexnYSKKYuEW4zuC-QrR4X8G53w6Q>
>  / Freightos Blog 
> <http://www.google.com/url?q=http%3A%2F%2Ffreightos.com%2Fresources%2Ffreightos-blog%2F&sa=D&sntz=1&usg=AFrqEzczY9ZxESxvh7ITnd_Al01Xyp4gdA>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/7b37cf99-e564-4ca8-aa4c-99183d6bae78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to